IONIC: File size getting increasing after copying file from internal storage to application directory using file plugin

131 Views Asked by At

I have copied an image from my laptop to android mobile's internal storage. Then I've opened my Ionic app, selected that Image, and copied it to the application directory using the file plugin.

On my mac laptop, the image size was 8.1 MB, after copying it into the mobile device it became 7.74 MB. Then after copying it to the application directory using my app it became 10.60 MB.

  • Laptop to Mobile: 8.1 MB to 7.74 MB
  • Mobile storage to application directory: 7.74 MB to 10.6 MB

Code I've used:

let copiedFile = await this.file.copyFile(fileParent, fileName, window.localStorage.getItem(STORAGE.PERSISTENT_STORAGE_PATH), fileName);

Here I've used the Ionic native file plugin for copying files.

Is there any specific reason behind happening this??

Please help me if anyone knows the reason or solution for this.

0

There are 0 best solutions below