Skip to content

readAsBinaryString issue in ie 11 #162

Closed
@vickykrbu

Description

@vickykrbu

Hi All,

I am using jquery.filedrop.js file to drag and drop file for uploading in mvc. It is working fine in Firefox and chrome but when i used the same in IE 11 getting issue in FileReader.readAsBinaryString line. I did some googled and got to know that IE 11 is not supporting this method. I have also gone with this link and used arraybuffer instead of binarystring this is working fine with IE 11 but when i open the file getting "This file format is different".
below is my bunch of code of filedrop.js where i changed from binarystring to arraybuffer.
` if (beforeEach(files[fileIndex]) != false) {
if (fileIndex === files_count) return;
var reader = new FileReader(),
max_file_size = 1048576 * opts.maxfilesize;

                reader.index = fileIndex;
                var filesSize = files[fileIndex].size;
                debugger;
                reader.onloadend = send;
                reader.readAsArrayBuffer(files[fileIndex]);//  reader.readAsBinaryString(files[fileIndex]);
              } else {
                filesRejected++;
              }`

Please help me to make this code works in IE also.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions