MyBB Community Forums

Full Version: move upload directory to another host
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello
how can I move upload directory to another host ?
is it possible ?
You can download all your website files from you (Host and and upload those files on another host)
no
I want every new attachment be uploaded to the new upload directory
(2016-04-07, 12:05 PM)MybbCo Wrote: [ -> ]no
I want every new attachment be uploaded to the new upload directory

if you host have file manager you can download public_html files. and you can upload those
I mean when I want to upload a new attachment via MyBB attachment , it goes to my new upload directory
I don't want to do it manually !
A way is to create an hook for the post created where you check if the current post has an attachment, then you connect via FTP to the other host ( here how in PHP ) and move the file there.

After this, delete from your site and update the attachment link ( or the links of attachments, idk the structure ).

Maybe, instead of FTP, recall a page from your external site that download the passed file via GET ( example: anothersite.com/download.php?file=http://www.site.com/attachment ) and then update links.

If you want to upload to an host not yours, maybe you can see if Mega.nz, rapidfire etc have APIs to upload files. Idk.