开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜