Attaching a local file to a package using the API

Viewing 3 posts - 1 through 3 (of 3 total)
#193256

Roco Montgomery
Participant

Hi,

My understanding is that in order to upload a file to a package using the API, this file needs to reside in the “wp-content/uploads/download-manager-files” directory. That is a problem for me because I would like to upload files that reside on my computer.

Is there a workaround that would allow me to attach local files to a package using the API?

For example, I was thinking that maybe I could first upload my local file to “wp-content/uploads/download-manager-files” (using some API), and then attach it to the package. Is this possible? How can I upload a file to this directory using the API?

Any other solutions are welcome.

Best regards,

Roco

#193265

Tahasin
Moderator

Hello, Roco Montgomery

Hope you are well and thanks for contacting us.

Yes, you are right, file should reside here wp-content/uploads/download-manager-files. For uploading the file you may follow this documentation.

You can add your files using ftp to the download-manager-files. Unfortunately, there is no other solution right now. We will update this REST API add-on soon.

Regards

#193267

Roco Montgomery
Participant

Thanks for the prompt reply. Looking forward to the update!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.