Is It Possible to Upload Certain Attachment Files To A Remote Server

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.com/books/novel/the-new-book.pdf ) into the database along with it's attachment data.

Topic media-library uploads cdn pdf Wordpress

Category Web


The 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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.