Allow 2-level concatenation of extensions
It's quite simple. When uploading, say, a .tar.gz
file, the extension stays as .gz
on the final upload.
The suggestion is maintain the original extension, up to two levels, so that when the uploading filename ends in .tar.xz
, .sql.bz2
, .txt.gz
, and the mimetype of the file matches (in the file's content), AND the 2nd level extension is a valid extension (to prevent people from going .aaaaa.gz
), we use it as the upload's filename.
Note that we trust that the 2nd level extension is the actual extension of the decompressed file. elixire should not attempt to decompress it.
Edited by luna