Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3348914
D4900.id16079.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D4900.id16079.diff
View Options
diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js
--- a/native/input/input-state-container.react.js
+++ b/native/input/input-state-container.react.js
@@ -596,7 +596,7 @@
let errorMessage;
let reportPromise;
- const finish = async (result: MediaMissionResult) => {
+ const onUploadFinished = async (result: MediaMissionResult) => {
if (!this.props.mediaReportsEnabled) {
return errorMessage;
}
@@ -612,7 +612,7 @@
);
return errorMessage;
};
- const fail = (mediaID: string, message: string) => {
+ const onUploadFailed = (mediaID: string, message: string) => {
errorMessage = message;
this.handleUploadFailure(localMessageID, mediaID);
userTime = Date.now() - start;
@@ -632,13 +632,13 @@
processResult.reason === 'video_too_long'
? `can't do vids longer than ${videoDurationLimit}min`
: 'processing failed';
- fail(localMediaID, message);
- return await finish(processResult);
+ onUploadFailed(localMediaID, message);
+ return await onUploadFinished(processResult);
}
processedMedia = processResult;
} catch (e) {
- fail(localMediaID, 'processing failed');
- return await finish({
+ onUploadFailed(localMediaID, 'processing failed');
+ return await onUploadFinished({
success: false,
reason: 'processing_exception',
time: Date.now() - processingStart,
@@ -672,7 +672,7 @@
mediaMissionResult = { success: true };
} catch (e) {
uploadExceptionMessage = getMessageForException(e);
- fail(localMediaID, 'upload failed');
+ onUploadFailed(localMediaID, 'upload failed');
mediaMissionResult = {
success: false,
reason: 'http_upload_failed',
@@ -775,7 +775,7 @@
await Promise.all(promises);
- return await finish(mediaMissionResult);
+ return await onUploadFinished(mediaMissionResult);
}
mediaProcessConfig(localMessageID: string, localID: string) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 4:30 PM (19 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2570476
Default Alt Text
D4900.id16079.diff (2 KB)
Attached To
Mode
D4900: [native] Rename callbacks in `InputStateContainer:uploadFile` for clarity
Attached
Detach File
Event Timeline
Log In to Comment