Closed GoogleCodeExporter closed 9 years ago
Please provide the imagefile you try to upload so I can test it with proper
data.
Original comment by ondrej.zara
on 21 Jun 2009 at 9:55
It makes so on any jpeg image, you can test it yourself with the code snippet
that
you have written in the wiki, just replace the output so that it prints out
item.data.length.
Something like this:
for (var file in request.files) {
var items = request.files[file];
if (!(items instanceof Array)) { items = [items]; }
for (var i=0;i<items.length;i++) {
var item = items[i];
response.write("Data lenght: " + item.data.length + "\n");
}
}
Btw, what is this line for?
if (!(items instanceof Array)) { items = [items]; }
Original comment by rand0mbond@gmail.com
on 22 Jun 2009 at 7:11
Ok, I will test with any image.
The last line is useful for "multiple" file upload feature, supported by Safari
and
Opera. In this case, one input field (input type="file") can send several files
at
once - and these will be available as an array.
Original comment by ondrej.zara
on 22 Jun 2009 at 7:46
I was not able to simulate the issue. I tried with a JPG image (attached to this
comment) with size 33227 - and file upload worked normally.
Original comment by ondrej.zara
on 22 Jun 2009 at 8:25
Attachments:
Hmm... for me with this image the code above returns 2654.
It might be because I have revision 444, but I didn't noticed any changes in
the http
module since that.
How do you think what may cause the problem?
Original comment by rand0mbond@gmail.com
on 22 Jun 2009 at 9:15
I suggest switching to mail-based conversation :) It would be nice to record
(wireshark?) the HTTP POST request to see what is happening. Or, at least,
record the
request HTTP headers.
Original comment by ondrej.zara
on 22 Jun 2009 at 9:25
Finally acknowledged :)
Original comment by ondrej.zara
on 22 Jun 2009 at 1:18
Original comment by ondrej.zara
on 22 Jun 2009 at 1:18
Original comment by ondrej.zara
on 22 Jun 2009 at 2:19
Original issue reported on code.google.com by
rand0mbond@gmail.com
on 21 Jun 2009 at 6:02