aspose file tools*
The moose likes JForum and the fly likes Attachments (to outside JForum directories) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Attachments (to outside JForum directories)" Watch "Attachments (to outside JForum directories)" New topic
Author

Attachments (to outside JForum directories)

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I would like to be able to have users upload filies to a path that is outside JForum.

I see in the Global.Properties file you have

attachments.upload.dir = upload
attachments.store.dir = ${application.path}/${attachments.upload.dir}

can someone tell me how I can set up to save files in a different path?

Many thanks,

--Dave

[originally posted on jforum.net by dcrumb]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Just set "attachments.store.dir" to the path you want, like /tmp/myuploads or c:/data/application/upload

Note that, on windows, you should use / instead of \

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hello all,

Sorry for ressurect a post from 2006, but I have some problems regarding the avatar's images.

I changed my SystemGlobals to use a specific file from disk "D:", the config line is like that:


But, the forum only looks for the same location, and always give me the error:


Has someone any clue of where can be my mistake?

Cheers,
Machado


[originally posted on jforum.net by Machado]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Attachments are not the same as Avatar images. They will always be created in the contextPath()\images\avatar directory. These are uploaded first to this location as with an _tmp in the name, then resized to the maximum size with the permanent name. The _tmp file is then deleted.

My first guess at what is causing the error is that the app server can not create files in the images\avatar directory or that you've deleted that directory.

There should be more error information in the log4j log (probably your app server log).
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hello Monroe,

First of all, tanks for the help.
I missed that.

You are correct, this error was caused because the application doesn't have the avatar directory in this location.

Cheers,
Machado


[originally posted on jforum.net by Machado]
 
wood burning stoves
 
subject: Attachments (to outside JForum directories)