apache / cordova-plugin-file

Apache Cordova File Plugin
https://cordova.apache.org/
Apache License 2.0
740 stars 757 forks source link

Fixed an issue that caused files to not be able to be uploaded for some reasons #614

Closed hlushko-arthur closed 5 months ago

hlushko-arthur commented 5 months ago

Platforms affected

Android, IOS

Motivation and Context

For unknown reasons, the uploaded file was of type text/plain, which caused an error and the file could not be uploaded

Description

I just added these lines to FileReader.js if(file.type == 'text/plain') { file = new Blob([file], { type: 'text/plain' }); }

Checklist