You are here: Re: probs. with input element type="file" « HTML « IT news, forums, messages
Re: probs. with input element type="file"

Posted by Brian Cryer on 04/26/06 12:28

"darksaga" <darksaga_work@yahoo.com> wrote in message
news:1145974632.472870.62860@y43g2000cwc.googlegroups.com...
> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация