I use this tutorial 1 ,tutorial 2 and create new posts in python code, with below json:
post = {'title' : title, 'status' : 'publish', 'content' : 'Hello this is content of my post.','categories': 5, # category ID'date' : '2020-01-05T10:00:00', }
The code work well done. The code create new post with content Hello this is content of my post.
.
But I want add three PDF file(uploaded) to content new post.
I known file 1.pdf
id is 324, file 2.pdf
id is 325, file 3.pdf
id is 326.
How can I attach three PDF file uploaded to new post?