probs. with input element type="file"

D

darksaga

hi ppl,

i have to upload very big files (could be bigger than 2gb) web-based
via http (e.g. <input type="file" name="test_browser" size="50"/>) to
our intranet tomcat server. Therefore i use following cgi script
(http://www.freeware-base.de/freeware-base-artikel11663.html) which has
been modified for our needs. It indicates upload speed, time left etc.
(see link). Everything works fine, speed is very
nice (transfer of 1GB in around 1minute) from a local or net drive to
the server. So i can exclude probs with the cgi script.

Problems occur if you wan't to upload files beeing bigger than 2GB. If
you click on the "browse" button of the element and want to choose such
a big file, its impossible. The file size of such big files (> 2GB) is
shown as "0" and you can't select them in the file browser. (tested it
on win, sun & linux machines)

Biggest file i could select was (2140686574Bytes = 1,99GB), but some i
need to upload, are ~4000000000Byte=4GB.

I did not find anything @ w3c about a size restriction of the element
type="file" and its file browser.

Anybody knows if there's a maximum file size the file browser can
handle and if there is a workaround, to be able to get bigger files?

Thanks in advance

greets darksaga
 
H

Hywel Jenkins

darksaga said:
hi ppl,

i have to upload very big files (could be bigger than 2gb) web-based
via http (e.g. <input type="file" name="test_browser" size="50"/>) to
our intranet tomcat server. Therefore i use following cgi script
(http://www.freeware-base.de/freeware-base-artikel11663.html) which has
been modified for our needs. It indicates upload speed, time left etc.
(see link). Everything works fine, speed is very
nice (transfer of 1GB in around 1minute) from a local or net drive to
the server. So i can exclude probs with the cgi script.

Problems occur if you wan't to upload files beeing bigger than 2GB.

Is this a limit with your server, rather than the script?
 
D

darksaga

hmm,
could be the serverversion, have to ask the admin tomorrow what version
we are using exactly.

why is it that insane to send over 2GB via http?
- its fast (constant upload speeds >10MB/s)
- its userfriendly (browse button --> browse to file; upload button
-->upload file (during upload u get a nice progress view (see:
http://www.freeware-base.de/freeware-base-artikel11663.html)
- files are only temporally on the server (user does the upload; user
starts computation; user get result via mail; afterwards files are
deleted; whole process normally < 24h)
- if i use ftp, my cgi script will be more complex (i could be wrong @
that point, due i'm pretty new to perl&cgi)

greets
 
D

darksaga

found the prob :)

the webserver is a Apache/1.3.26

for large file support (files >2GB) you need a Apache/2.2.

have to ask the admin, if he could move to the new version....

many thanks to Jim for this hint.

darksaga
 
B

Brian Cryer

darksaga said:
hi ppl,

i have to upload very big files (could be bigger than 2gb) web-based
via http (e.g. <input type="file" name="test_browser" size="50"/>) to
our intranet tomcat server. Therefore i use following cgi script
(http://www.freeware-base.de/freeware-base-artikel11663.html) which has
been modified for our needs. It indicates upload speed, time left etc.
(see link). Everything works fine, speed is very
nice (transfer of 1GB in around 1minute) from a local or net drive to
the server. So i can exclude probs with the cgi script.

Problems occur if you wan't to upload files beeing bigger than 2GB. If
you click on the "browse" button of the element and want to choose such
a big file, its impossible. The file size of such big files (> 2GB) is
shown as "0" and you can't select them in the file browser. (tested it
on win, sun & linux machines)

Biggest file i could select was (2140686574Bytes = 1,99GB), but some i
need to upload, are ~4000000000Byte=4GB.

I did not find anything @ w3c about a size restriction of the element
type="file" and its file browser.

Anybody knows if there's a maximum file size the file browser can
handle and if there is a workaround, to be able to get bigger files?

2gig (or rather 2^31 - 1 bytes = 2,147,483,646) is the largest number that
can be represented by a signed 4 byte (32 bit) integer. This means that once
you move to 2GB or above that in order for the upload to work each of the
components involved in the file upload must work with either 4 byte unsigned
integers or 8 byte signed integers. (The largest file you seem to be able to
send is less than 2^31-1 bytes but I'm sure that there is additional
overhead involved somewhere in the process which will take it over the
limit.) You are hitting problems at that threshold, which means the problem
could be with any of the components involved, the browser, the server or
with your cgi script.

Having had a brief look at the cgi script you use, its Perl and integers in
Perl are 32 bit. So at the very least you are almost certainly hitting a
limitation with your upload script.

I realise that this doesn't help in how to get around the problem, but it
might help in understanding why there is a problem. --
Brian Cryer
www.cryer.co.uk/brian
 
J

Jim Higson

darksaga said:
found the prob :)

the webserver is a Apache/1.3.26

If only Apache would hurry up and get to version 1.3.37!
for large file support (files >2GB) you need a Apache/2.2.

have to ask the admin, if he could move to the new version....

many thanks to Jim for this hint.

No probs.
 
J

Jim Higson

darksaga said:
hmm,
could be the serverversion, have to ask the admin tomorrow what version
we are using exactly.

why is it that insane to send over 2GB via http?

I suppose it probably isn't. It sure feels counter-intuative to use a web
browser as heavy-duty data mover though.
You know your needs better than I, and I can't easily think of any other
way, though so well done for thinking outside the box!
 
W

wayne

Jim said:
Hywel Jenkins wrote:

But... sending 2GB over http is insane!

Why is that? I download 3 to 4 gigabyte files using http whenever I
want to try a new software distro with no problem.

--
Wayne
http://www.glenmeadows.us
With or without religion, you would have good people doing good things
and evil people doing evil things. But for good people to do evil
things, that takes religion.
—Steven Weinberg
 
J

Jim Higson

wayne said:
Why is that? I download 3 to 4 gigabyte files using http whenever I
want to try a new software distro with no problem.

I already replied in this thread saying it probably isn't really all that
bad, just feels counter-intuative.

Personally I preffer Bittorrent for getting distro CDs.
 
W

wayne

Jim said:
I already replied in this thread saying it probably isn't really all that
bad, just feels counter-intuative.

Personally I preffer Bittorrent for getting distro CDs.
Saw your first post after I had replied. Perhaps I should have read the
whole thread first!

--
Wayne
http://www.glenmeadows.us
With or without religion, you would have good people doing good things
and evil people doing evil things. But for good people to do evil
things, that takes religion.
—Steven Weinberg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,084
Latest member
HansGeorgi

Latest Threads

Top