• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Attachments (to outside JForum directories)

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
The knights of nee want a shrubbery. And a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic