HTTP PUT for file uploads

mike mike503 at
Fri Aug 1 03:48:20 MSD 2008

It appears that nginx has built-in support for the PUT method.

My company needs a file upload solution that will support large file
uploads (2GB limit is optional - if we have to tell them less than 2GB
that's fine) that will keep re-trying the upload until it is done. We
have slow geo users and then just flat out large files to deal with
even from fast connections.

There's a variety of Java-based PUT uploaders.

So far, we haven't found any Flash ones (we'd love to NOT use Java) -
but there is a way to do it apparently, we just can't find anyone
who's done it yet.

Anyway, from the nginx side, I assume I would need to have some
timeouts set pretty long. Would anyone here have any ideas about that?

I'm assuming that we should keep the connection open as long as there
is some activity and maybe timeout after a minute or two... the
client-side applet should have the logic to continue retrying and
since it is PUT, the PHP script will accept the data and use fseek()
on the file to resume at the offset supplied (the client will have to
give us that info)

See the examples here: - look at the "Handlers that
support resume" section.

Anyone have any thoughts? I think I also need to tweak PHP settings
too possibly as well, for max execution time and such.

More information about the nginx mailing list