J
john_ramsden
I have to prepare an Apache/PHP based (or perl if easier) web
page that allows a user to upload very large files, possibly
over 10 Gbytes and maybe up to 100 Gbytes.
I'm aware that file upload limits can be increased by config
changes; but I'd rather minimize the need for changes like
this, both for admin reasons and to avoid possible (?) memory problems
or even bugs.
In principle there's a simple solution whereby the user runs
an initial page, in which they input the file name, and the
Submit button then runs JavaScript in the page.
The JavaScript opens the file, positions at a start offset
(initially zero), and reads and uploads up to a fixed length
of the contents, along with a continuation offset (or zero
to indicate the end reached), and the server code re-runs
the script in a loop while this returned offset is non-zero.
Subsequent runs of the script would bypass the data input
and execute the JavaScript directly.
Anyway, the question I have is whether anyone has written
anything similar, ideally with a progress bar?
The only problem I anticipate is possible delays, and even
timeouts, while the code (client or server) positions to
the next offset to read or write (respectively) the next
chunk of a very large, e.g. 50 GByte, file.
Any suggestions gratefully received.
(It's a shame Apache doesn't seem to have an embedded FTP
server in some way. I guess FTP would be the obvious choice,
but the client doesn't wish to have a separate FTP server
running.)
Cheers
John R Ramsden (jramsden at glassouse.com)
page that allows a user to upload very large files, possibly
over 10 Gbytes and maybe up to 100 Gbytes.
I'm aware that file upload limits can be increased by config
changes; but I'd rather minimize the need for changes like
this, both for admin reasons and to avoid possible (?) memory problems
or even bugs.
In principle there's a simple solution whereby the user runs
an initial page, in which they input the file name, and the
Submit button then runs JavaScript in the page.
The JavaScript opens the file, positions at a start offset
(initially zero), and reads and uploads up to a fixed length
of the contents, along with a continuation offset (or zero
to indicate the end reached), and the server code re-runs
the script in a loop while this returned offset is non-zero.
Subsequent runs of the script would bypass the data input
and execute the JavaScript directly.
Anyway, the question I have is whether anyone has written
anything similar, ideally with a progress bar?
The only problem I anticipate is possible delays, and even
timeouts, while the code (client or server) positions to
the next offset to read or write (respectively) the next
chunk of a very large, e.g. 50 GByte, file.
Any suggestions gratefully received.
(It's a shame Apache doesn't seem to have an embedded FTP
server in some way. I guess FTP would be the obvious choice,
but the client doesn't wish to have a separate FTP server
running.)
Cheers
John R Ramsden (jramsden at glassouse.com)