Currently vowel handles any uploads from the user, and that could lead to memory exhaustion.
vowel
The nginx upload module could be used to handle the buffering and writing to disk.
nginx upload
The filepath is passed through to vowel, so that the upload endpoint can move the file into the correct location. This would also allow scanning, conversion or compression to be performed before being declared "clean" and moved into the document store.
jQuery upload example: https://github.com/blueimp/jQuery-File-Upload/wiki/Uploading-to-nginx-using-the-nginx-upload-module
An upload endpoint in nginx will need login protection, as the upload is completed before the request is passed onto vowel.
upload
nginx
Use of ngx_http_auth_request_module may be needed, for example:
ngx_http_auth_request_module
location /upload { # ... auth_request /auth/check; } location = /auth/check { proxy_pass http://vowel/auth/check; proxy_pass_request_body off; proxy_set_header Content-Length ""; proxy_set_header X-Original-URI $request_uri; }
Metadata Update from @samwwwblack: - Issue tagged with: enhancement
Login to comment on this ticket.