File upload, renamed automatically
When I do a file upload using FileStore, it automatically renames the uploaded file.
Is it possible to not do this? Because when I do a开发者_Go百科 download, the real file name doesn't have an extension, and the client doesn't know how to open it.
The solution is to setup mod-rewrite like this:
RewriteRule /upload/(.*).jpeg $1 [L]
This way you can use extension "jpeg", and it would still point to the right file.
Leaving default filenames is insecure.
精彩评论