MyBB Community Forums

Full Version: Specify Attachment Upload Folder
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a unique circumstance that I was hoping could be solved.

I want to setup a mybb to work over lan so that my co-workers and myself can share files and information (work-related). The files we will be sharing are primarily html and code files that are used repetitively. Since I will be hosting the server on my personal workstation at my desk (the company won't provide a better solution), I want the file attachments to be available even if the mybb server is not.

What I want to do is make the file upload folders available on a separate network drive. I'm pretty sure I can specify that files should upload there, but I want to be able to organize the folder structure.For example, I want files uploaded in the "codes" forum to go into the "codes" folder, and files uploaded into the "images" forum to go into the "images" folder.

I don't see anyway to accomplish something like this, so I thought I would pose the question here. Any thoughts? Huh
I'm not really 100% sure this will work but I'll give you the idea I had when I read the above. I'm not really too key'd up on uploading stuff through PHP, I've never really paid an interest in any of it...!

In the Server and Optimization Options, there is an option for the Uploads Path. So technically this determines where the uploads go. But this is hard coded in ./inc/functions_upload.php in each function, so technically we can override it.

Have a look in this file for the uploads path, and change it to what you want it to be. I have no idea how this would affect the attachments on the forum, though.