Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 26 Sep 2016, 12:23
muffel muffel is offline
 
Join Date: Mar 2007
Copy Attachments in file-system

We have a forum, where all attachments are in the database... and they should stay in the database.

But I want to download all attachments in our forum to a special folder on the server... where I also can then see, from which user this attachment is... and the extension should also be right - for example ".jpg" ... Is there a workaround for this?

Thank you!
Reply With Quote
  #2  
Old 26 Sep 2016, 16:42
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Real name: Brandon
I wouldn't suggest this but you can set your folder to a public location. All files will be in numbered folders.
__________________

Email me for website help: brandon[at]sheley[dot]org
Reply With Quote
  #3  
Old 26 Sep 2016, 16:57
muffel muffel is offline
 
Join Date: Mar 2007
Thank you - but I know this way. I want to keep the files in the database - just make a copy of them into the file-system.
Reply With Quote
  #4  
Old 26 Sep 2016, 16:59
Dave Dave is online now
 
Join Date: Jun 2010
Real name: Dave
As far as I know there's no automated tool for this.
You'd have to make a script for it or find someone to make a script for you to export it from the database into the filesystem with the right filename and extensions and into user folders.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #5  
Old 26 Sep 2016, 16:59
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Real name: Brandon
I wouldn't keep them in the database regardless, that's for sure.
It's smarter to have them in the file system. It's mapping like you're asking that's the not so easy part.
__________________

Email me for website help: brandon[at]sheley[dot]org
Reply With Quote
  #6  
Old 26 Sep 2016, 21:45
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
Guys - how now brown cows!

This is so easy it hurts (lol) i.e. just move them to filesystem (so it generates the files accordingly) then copy the files so you have the "copy" of the attachments you desire. Of course the files will not have the proper names but will be viewable in an image editor. Once done downloading simply move them back into the database and done.

Super easy unless I missed something?

Edit: Ahh I see why you all thought... okay okay so basically yes it will be for example file names such as 34.attach and then the thumbnail would be 34.thumb which is clearly not 34.jpg or 34.png HOWEVER you can open these via photoshop OR a free program called Gimp 2 and they will open and display the file fine for viewing, you can then save to a proper windows style extension instead of vBulletins .thumb/.attach etc etc.
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!

Last edited by TheLastSuperman; 26 Sep 2016 at 21:54.
Reply With Quote
Reply


Tags
attachment, copy, download, file


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 12:28.

Layout Options | Width: Wide Color: