react-native-compressor icon indicating copy to clipboard operation
react-native-compressor copied to clipboard

[BUG] exported video PHAsset stays in tmp folder and dramatically increases application storage size

Open iserzh opened this issue 1 year ago • 1 comments

Current behavior

After compressing a local video asset (PHAsset), a temporary file (not the compressed one) will remain in storage, increasing the application size.

It is not possible to clean an exported PHAsset on the consumer side due to a lack of tmp path support from compressVideo in react-native-compression. This results in two files being created: a compressed file and an exported file before compression.

Expected behavior

Tmp files should be removed after compression or compressVideo should privde url to manually remove this file

Platform

  • [] Android
  • [X] iOS

React Native Version

0.73.2

React Native Compressor Version

1.8.24

Reproducible Steps And Demo

  1. Compress PHAsset (something from camera roll)
  2. Remove file that was returned from compressVideo method
  3. Check app storage usage or list files in tmp directory

iserzh avatar Jun 13 '24 14:06 iserzh