Uploading a .rar file with Javascript

Hello,

I’m using UploadiFive
For .rar file: application/x-rar-compressed, application/x-rar
I used it but it gives the message “Unknown Error”

I found a code on the Internet: https://jsfiddle.net/Drakes/yvnvfsdu/
I’ve uploaded a zip file:
JS%20FileReader%20MIME%20type%20sniffer%20%20%20JSFiddle
I’ve uploaded a rar file
JS%20FileReader%20MIME%20type%20snifferj%20%20%20JSFiddle
No mime type for Rar
Unable to check rar file extension with javascript?

you don’t need javascript to validate the type, you do need php to do so.

yes, but the page needs to be loaded without submitting.

Interesting situation when not checking the rar file when checking other files

application/x-rar-compressed, application/octet-stream

should be the type it comes up with, but either way, the backend is what validates it because the frontend can be modified to attempt to allow it anyway.

should be the type it comes up with, but either way, the backend is what validates it because the frontend can be modified to attempt to allow it anyway.

Doing winrar file upload with empty double quotes for
However, there is a problem,
Disallowed files message loaded, but could not really load the file

https://antenfiyati.com/yukleme.mp4

Maybe I need further explanation? I see a rar file showing that it uploaded, I do not see the exe file there however. But, you were asking about the rar files.

The problem is the rar file,
javascript code does not specify the rar file type, and since it cannot be determined, I set double quotes in the file type permission field,
The example shows it was loaded even though I don’t allow the exe file type but it doesn’t actually load
So, “” allows loading the double quotation rar file type, but it shows that other files that are not allowed have been eaten.

Or is it possible to check the file extension for the rar file type only in the fileType: field shown in the picture above?

Sponsor our Newsletter | Privacy Policy | Terms of Service