User file uploads

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I am building a page that allows people to send in text and/or html files
and have them analyzed for several statistics by a serverside PHP script.

I'd like the files to be sent zipped or rar'd or whatever flavour is
opensource, free and available. How can I -other than by asking them to zip
their files- ensure the files they send are compressed before they're
actually sent ? I guess this must be done in JS ? Can the PHP script
auto-decompress the files and process the contents ?
And when I send their analysis back as HTML, is it possible to have that
sent in a zipped way and auto-decompressed in the viewer's browser ? I don't
really understand the Apache zip option in the configuration.

Help much appreciated.

Re: User file uploads

Pjotr Wedersteers wrote:
Quoted text here. Click to load it

You absolutely cannot do that.

Quoted text here. Click to load it

Unlikely as javascript has no file manipulation features built in.
Javascript is also not capable of 'ensuring' anything as client-side
scripting may be disabled/unavailable, subverted or by-passed. Anything
arriving at a server in an HTTP request should be regarded as unknown
and suspect.

Quoted text here. Click to load it

A question better asked in a PHP group, but the answer is probably yes.

Quoted text here. Click to load it

Doesn't HTTP 1.1 include provision for doing exactly that automatically?

Quoted text here. Click to load it

RTFM, then ask an apache/http server group.


Site Timeline