probs. with input element type="file"

Discussion in 'HTML' started by darksaga, Apr 25, 2006.

  1. darksaga

    darksaga Guest

    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
     
    darksaga, Apr 25, 2006
    #1
    1. Advertising

  2. darksaga wrote:
    > 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?

    --
    Hywel
    http://kibo.org.uk/
     
    Hywel Jenkins, Apr 25, 2006
    #2
    1. Advertising

  3. darksaga

    Jim Higson Guest

    Hywel Jenkins wrote:

    > darksaga wrote:
    >> 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?


    Probably. I think all but the most recent versions of Apache have a two gig
    limit.

    see: http://www.nylug.org/pipermail/nylug-talk/2006-March/029492.html which
    seems to suggest Apache 2.2 or later is needed.

    But... sending 2GB over http is insane!
    --
    Jim
     
    Jim Higson, Apr 25, 2006
    #3
  4. darksaga

    darksaga Guest

    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
     
    darksaga, Apr 25, 2006
    #4
  5. darksaga

    darksaga Guest

    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
     
    darksaga, Apr 26, 2006
    #5
  6. darksaga

    Brian Cryer Guest

    "darksaga" <> wrote in message
    news:...
    > 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
     
    Brian Cryer, Apr 26, 2006
    #6
  7. darksaga

    Jim Higson Guest

    darksaga wrote:

    > 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.
     
    Jim Higson, Apr 26, 2006
    #7
  8. darksaga

    Jim Higson Guest

    darksaga wrote:

    > 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!

    > - 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
     
    Jim Higson, Apr 26, 2006
    #8
  9. darksaga

    wayne Guest

    Jim Higson wrote:
    > 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
     
    wayne, Apr 27, 2006
    #9
  10. darksaga

    Jim Higson Guest

    wayne wrote:

    > Jim Higson wrote:
    >> 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.


    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.

    --
    Jim
     
    Jim Higson, Apr 27, 2006
    #10
  11. darksaga

    wayne Guest

    Jim Higson wrote:
    > wayne wrote:
    >
    >> Jim Higson wrote:
    >>> 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.

    >
    > 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
     
    wayne, Apr 27, 2006
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    7
    Views:
    21,897
    ravee
    Mar 19, 2008
  2. HANM
    Replies:
    2
    Views:
    734
    Joseph Kesselman
    Jan 29, 2008
  3. Roberto
    Replies:
    3
    Views:
    320
  4. Rebhan, Gilbert
    Replies:
    2
    Views:
    196
    Jano Svitok
    May 14, 2007
  5. Matt
    Replies:
    3
    Views:
    132
    Randy Webb
    Nov 13, 2004
Loading...

Share This Page