diff --git a/in-app/v1/src/utils/useUpload.ts b/in-app/v1/src/utils/useUpload.ts index d7f2a262c..3327080a6 100644 --- a/in-app/v1/src/utils/useUpload.ts +++ b/in-app/v1/src/utils/useUpload.ts @@ -44,7 +44,7 @@ export function useUpload({ onError }: UseUploadOptions = {}): UseUploadResult { const fileInfo: FileInfo = { key, name: file.name, - url: createObjectURL(file), + url: URL.createObjectURL(file), progress: 0, }; @@ -80,7 +80,7 @@ export function useUpload({ onError }: UseUploadOptions = {}): UseUploadResult { .then((file) => { update({ id: file.id, - url: fileInfo.url ?? file.url, + // url: file.url, mime: file.mime, progress: undefined, }); @@ -102,9 +102,3 @@ export function useUpload({ onError }: UseUploadOptions = {}): UseUploadResult { return { files, isUploading: uploadingCount > 0, upload, remove, removeAll }; } - -function createObjectURL(obj: Blob) { - if (typeof URL === 'function' && typeof URL.createObjectURL === 'function') { - return URL.createObjectURL(obj); - } -}