mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 16:33:26 +00:00
fix saved local path
This commit is contained in:
@@ -132,14 +132,12 @@ export const useDownloadManager = () => {
|
||||
);
|
||||
try {
|
||||
updateDownloadItem(download.id, { status: "importing" });
|
||||
|
||||
const asset = await MediaLibrary.createAssetAsync(fileUri);
|
||||
const { localUri } = await MediaLibrary.getAssetInfoAsync(asset);
|
||||
await FileSystem.deleteAsync(fileUri);
|
||||
|
||||
updateDownloadItem(download.id, {
|
||||
status: "finished",
|
||||
localPath: localUri,
|
||||
localPath: asset.uri,
|
||||
});
|
||||
console.log("File saved to media library and original deleted");
|
||||
showToast("Download finished", {
|
||||
|
Reference in New Issue
Block a user