• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

upload files larger than 100Kb

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the problem to upload files larger than 100KB.

I am using 2.1.8, and both 'upload' and 'tmp' folders are there. I can upload files less than 100KB, for files larger than 100KB, no error pop-up, just nothing shows up. I don't know if anyone still have this attachment issue. Thanks.
[originally posted on jforum.net by chows@gvmc.org]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved according to Monroe's suggestion. It is caused by hard coded memory threshold of WebRequestContext.handleMultipart which limits the file size that can be upload. After I have changed it to 1000K, I am able to upload files more than 100KB but less than 1000KB.
Change the value as your limitation in following code (set up 3MB upload limit in the following example):
ServletFileUpload upload = new ServletFileUpload(new DiskFileItemFactory(3000 * 1024, tmpDir));
in WebRequestContext.java
After compiled, copy WebRequestContext.class to \WEB-INF\classes\net\jforum\context\web
[originally posted on jforum.net by chows@gvmc.org]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing to make clear... the "threshold" setting in this is the amount of real physical memory (e.g. RAM/paging space) that will be used while uploading a file. If a file is larger than this threshold, the file will not be stored in memory but in a temporary file on the disk.

So, you may "fix" your problem by storing things in memory, but then have major performance problems because multiple file uploads are using up your memory/paging space.

IMHO, it's better to figure out why the temporary file can't be created.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bonjour,

La solution est simple !
Dans le fichier SystemGlobals.properties remplacer la ligne
tmp.dir = tmp
par la ligne
tmp.dir = ${application.path}/tmp

It works fine !

Marc


[originally posted on jforum.net by Mal1]
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic