Merge pull request #433 from AnthonyWard/master

CB-13923 (android) fix -1 length for compressed files
This commit is contained in:
Joe Bowser
2018-03-07 13:26:28 -08:00
committed by GitHub

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);