最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin1浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

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.

发布评论

评论列表(0)

  1. 暂无评论