Changeset View
Changeset View
Standalone View
Standalone View
native/input/input-state-container.react.js
Show First 20 Lines • Show All 790 Lines • ▼ Show 20 Lines | ): Promise<?string> { | ||||
} | } | ||||
// if there's a thumbnail we'll temporarily unlink it here | // if there's a thumbnail we'll temporarily unlink it here | ||||
// instead of in media-utils, will be changed in later diffs | // instead of in media-utils, will be changed in later diffs | ||||
if (processedMedia.mediaType === 'video') { | if (processedMedia.mediaType === 'video') { | ||||
const { uploadThumbnailURI } = processedMedia; | const { uploadThumbnailURI } = processedMedia; | ||||
cleanupPromises.push( | cleanupPromises.push( | ||||
(async () => { | (async () => { | ||||
const disposeStep = await disposeTempFile(uploadThumbnailURI); | const { | ||||
steps: clearSteps, | |||||
result: thumbnailPath, | |||||
} = await this.waitForCaptureURIUnload(uploadThumbnailURI); | |||||
steps.push(...clearSteps); | |||||
if (!thumbnailPath) { | |||||
return; | |||||
} | |||||
const disposeStep = await disposeTempFile(thumbnailPath); | |||||
steps.push(disposeStep); | steps.push(disposeStep); | ||||
})(), | })(), | ||||
); | ); | ||||
} | } | ||||
if (selection.captureTime || selection.step === 'photo_paste') { | if (selection.captureTime || selection.step === 'photo_paste') { | ||||
// If we are uploading a newly captured photo, we dispose of the original | // If we are uploading a newly captured photo, we dispose of the original | ||||
// file here. Note that we try to save photo captures to the camera roll | // file here. Note that we try to save photo captures to the camera roll | ||||
▲ Show 20 Lines • Show All 610 Lines • Show Last 20 Lines |