|
Dear Developers,
I tried to upload a 1 MB file with the
attachment builder.
It failes with the following error:
INFO written(1168970)
INFO readPostFormData(): begin INFO readPostFormData(): writing to postValue: org.mmbase.util.PostValueToLargeException: Use getPostParameterFile at
org.mmbase.util.HttpPost.getPostParameterBytes(HttpPost.java)
at org.mmbase.module.builders.Attachments.setEditFileField(Attachments.java) at org.mmbase.module.builders.Attachments.process(Attachments.java) at org.mmbase.module.gui.html.MMEdit.process(MMEdit.java) if i backtrace it, i see in
Attachments.setEditField that only getPostParameterBytes is used and not
getPostParameterFile, while in HttpPost it is determined that if the uploaded
file/content is more then 1 MB it should be written to disk.
So in my oppinion Attachment.setEditField should
contain something like:
try
{
bytes =
getPostParameterBytes();
}
catch(Exception e)
{
bytes = new
FileInputStream(getPostParameterFile()).read();
}
Second:
Why is maxFileSize & MaximumPostbufferSize in
HttpPost hard-coded?
Greetings,
Sam Terburg
___________________ MagicMinds Amsterdam Prins Hendrikkade 20-21 1012 TL Amsterdam t 020.5217000 f 020.5217099 m 06-21892736 -----BEGIN GEEK CODE BLOCK-----
Version: 3.12 GE d s+:+ a-- C++++ UL++++ P+ L+++ E--- W++ N+ o K- w++ O- M-- V-- PS PE Y PGP- t+++ 5+ X+ R* tv+++ b- DI+ D- G e+ h++ !r !y+ ------END GEEK CODE BLOCK------ |
