`createAlbumAsync` with copy false

#1

MediaLibrary.addAssetsToAlbumAsync accept (as the 3rd parameters) boolean if to copy the asset. This is great. The problem is with createAlbumAsync which must get an asset for creating the album but there is no way to tell if I want to copy the asset or now.

Currently, when I create the album the asset saved both of the new album and CDIM album.

Is there another way to do it. Workaround such as delete it from the CDIM only, will be welcome :slight_smile:

Thanks!

Update

I just realised that createAssetAsync is actually create an asset and put it into DCIM folder. I tried to remove it by using

const removed = await MediaLibrary.removeAssetsFromAlbumAsync([asset], DCIM);
console.log(removed); // return true

But the asset is not removed from DCIM.

#2

Hi! Do you think you could open an issue on https://github.com/expo/expo with a complete, reproducible example of this behavior? Ideally you could provide us with a small Snack we can use as a test case. See also StackOverflow’s MCVE guide.

2 Likes
#3

Just did: https://github.com/expo/expo/issues/1844
Thanks!

closed #4

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.