You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method to determine the extension of a file is incorrect in the Aws controller.
Currently it looks at the mimetype, takes whatever text is in the mimetype and puts that as the file extension.
letpattern=/\.[0-9a-z]+$/i;letfoundFileExt=fileName.match(pattern);if(!foundFileExt){// Get the file extension from the mimetypeletfileExt=file.mimetype.substr(file.mimetype.indexOf('/')+1);// Add to the fileNamefileName+=`.${fileExt}`;}
this is incorrect, as many mimetypes are not proper file extensions, and if we set a default for the mimetypes, like many projects do for videos, than it will not be correct at all. For example, we upload a video on Iphone, it's probably a quicktime video, then we set a default mimetype of mp4. Quicktime videos Dont stream on Android, and now we don't know why the video wont work because it's labeled as an mp4.
The text was updated successfully, but these errors were encountered:
The method to determine the extension of a file is incorrect in the Aws controller.
Currently it looks at the mimetype, takes whatever text is in the mimetype and puts that as the file extension.
this is incorrect, as many mimetypes are not proper file extensions, and if we set a default for the mimetypes, like many projects do for videos, than it will not be correct at all. For example, we upload a video on Iphone, it's probably a
quicktime
video, then we set a default mimetype ofmp4
.Quicktime
videos Dont stream on Android, and now we don't know why the video wont work because it's labeled as anmp4
.The text was updated successfully, but these errors were encountered: