CB-13923 (android) fix -1 length for compressed files

This commit is contained in:
Anthony Ward 2018-02-27 12:39:30 +00:00
parent eddad666ff
commit e456a325f9

View File

@ -263,6 +263,7 @@ public class CordovaResourceApi {
} catch (FileNotFoundException e) {
// Will occur if the file is compressed.
inputStream = assetManager.open(assetPath);
length = inputStream.available();
}
String mimeType = getMimeTypeFromPath(assetPath);
return new OpenForReadResult(uri, inputStream, mimeType, length, assetFd);