diff --git a/.gitignore b/.gitignore index 7afbcce..fca016c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,7 @@ yarn-error.log # macOS .DS_Store + + +*.ipa +*.aab \ No newline at end of file diff --git a/components/local-upload-progress/local-upload-progress.component.jsx b/components/local-upload-progress/local-upload-progress.component.jsx index a9bd890..e704476 100644 --- a/components/local-upload-progress/local-upload-progress.component.jsx +++ b/components/local-upload-progress/local-upload-progress.component.jsx @@ -65,7 +65,14 @@ export function UploadProgress({ //if (!uploads) return null; - function handleOnSuccess(id, asset) { + function handleOnSuccess(id, asset, { duration }) { + //If it's not in production, show a toast with the time. + Toast.show({ + type: "success", + text1: `${duration} - Upload completed for ${asset.filename}.`, + text2: duration, + }); + logImEXEvent("imexmobile_successful_upload"); filesToDelete.push(asset); setProgress((progress) => ({ @@ -199,7 +206,7 @@ export function UploadProgress({ onError: (error) => handleOnError(p.id, error), onProgress: ({ percent, loaded }) => handleOnProgress(p.id, percent, loaded), - onSuccess: () => handleOnSuccess(p.id, p), + onSuccess: ({ duration }) => handleOnSuccess(p.id, p, { duration }), file: p, }, context: { diff --git a/util/local-document-upload.utility.js b/util/local-document-upload.utility.js index 92b8c0f..671063f 100644 --- a/util/local-document-upload.utility.js +++ b/util/local-document-upload.utility.js @@ -114,7 +114,10 @@ export const handleLocalUpload = async ({ ev, context }) => { ); } } else { - onSuccess && onSuccess(); + onSuccess && + onSuccess({ + duration: imexMediaServerResponse.headers["x-response-time"], + }); console.log("Succesful upload", imageData.filename); }