My Situation
I'm developing a book-store WordPress website where you can purchase and download books in PDF format. I don't want to use the local space for file storage (the host provider offers cheaper solutions for "download servers").
What I want to achieve
Every time my client tries to upload a new book to the website through media library upload feature, WordPress can detect that it's a PDF file and automatically upload it to the Download Server and save that URL (e.g. books.mywebsite/books/novel/the-new-book.pdf ) into the database along with it's attachment data.
My Situation
I'm developing a book-store WordPress website where you can purchase and download books in PDF format. I don't want to use the local space for file storage (the host provider offers cheaper solutions for "download servers").
What I want to achieve
Every time my client tries to upload a new book to the website through media library upload feature, WordPress can detect that it's a PDF file and automatically upload it to the Download Server and save that URL (e.g. books.mywebsite/books/novel/the-new-book.pdf ) into the database along with it's attachment data.
Share Improve this question edited Jun 15, 2020 at 8:21 CommunityBot 1 asked Oct 10, 2019 at 18:49 Babak Y.Babak Y. 237 bronze badges1 Answer
Reset to default 0The first thing I can think of is about using APIs from also popular hosting services like Dropbox.
If you look at the documents it’s pretty easy to upload, list and delete files. I’m pretty sure you can do the same with other dozens of similar services.
The WP API will do the REST (LOL)... Read more here.