pgaertig / nginx-big-upload

Resumable and reliable file uploads of any size. Nginx extension written in Lua.
https://github.com/pgaertig/nginx-big-upload
Other
192 stars 49 forks source link

Prevent file uploading before condition. #29

Open afwn90cj93201nixr2e1re opened 5 years ago

afwn90cj93201nixr2e1re commented 5 years ago

How we can make it? For example: Backend some lang, which can create some redis keys: client requests is file upload available -> server under nginx check it and create redis key for example: uid_hash_timestamp 30s -> send url to client -> client starts file uploading by given url -> nginx check utl second part, for example (location upload/url_key_in_redis) -> if url exists go to file uploading module -> ok

If another client starts uploading to same url(which is not his) or url is not represent in redis we should immediately block request without any parsing (no nginx processing, no upload processing).