My allowed file extension are txt msi mui.msi mst exe
If I'm uploading a file named "foo.1.0.0.Installer.MUI.msi" it get's renamed to foo.1.0.0.Installer.MUI_.msi and I have no idea why. Extension msi is allowed and I also tried mui.msi. Nothing works.
Note, file names cannot change.
The message is For security reasons, your upload has been renamed to %filename. from file_save_upload().
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2012-03-25_155545.png | 14.52 KB | hass |
Comments
Comment #1
August1914 commentedEssentially, a file extension is defined as that part of the filename which follows the final '.'. The '.' is not a supported character in the "allowed file extensions" in the field manager settings, (although nothing prevents you from adding it.)
If you change your "Allowed file extensions" to "txt, msi, mst, exe" (eliminating "mui.msi") then "foo.1.0.0.Installer.MUI.msi" will be uploaded without a name change. (works for me).
Some reference:
function file_munge_filename in file.inc, where it processes the filename to parts: $filename_parts = explode('.', $filename);
some related discussion:
http://drupal.org/node/285827
http://drupal.org/node/344658
Comment #2
hass commentedI've reviewed all settings again, see below. Your test results seems not correct. I guess you have not used the filename example I provided. See the node edit page:
Comment #3
webkenny commented@hass, Just want to ensure you followed this step first:
I've done the same and it also works for me as it does for #1.
Comment #4
hass commentedSee the screenshot, I removed it. The mui.msi was just a try as it does not work with "msi".
Comment #5
dave reidI think if you add just 'mui' to your allowed extensions this should no longer happen.
So:
txt msi mui msi mst exeComment #6
hass commentedTHX, that helped, however I do not understand why it's now not renaming
InstallertoInstaller_.This is not intuitive nor logic, nevertheless it works now properly.
Comment #7.0
(not verified) commenteda