Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32213187
D4891.1765146226.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D4891.1765146226.diff
View Options
diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js
--- a/web/input/input-state-container.react.js
+++ b/web/input/input-state-container.react.js
@@ -616,7 +616,7 @@
localID: getNextLocalUploadID(),
serverID: null,
messageID: null,
- failed: null,
+ failed: false,
file: fixedFile,
mediaType,
dimensions,
@@ -855,7 +855,6 @@
// The upload has been cancelled or completed before it failed
return {};
}
- const failed = e instanceof Error && e.message ? e.message : 'failed';
return {
pendingUploads: {
...prevState.pendingUploads,
@@ -863,7 +862,9 @@
...uploads,
[localUploadID]: {
...upload,
- failed,
+ failed: true,
+ failureMessage:
+ e instanceof Error && e.message ? e.message : 'failed',
progressPercent: 0,
abort: null,
},
@@ -1173,7 +1174,7 @@
if (uploadIDsToRetry.has(localID) && !pendingUpload.serverID) {
newPendingUploads[localID] = {
...pendingUpload,
- failed: null,
+ failed: false,
progressPercent: 0,
abort: null,
};
diff --git a/web/input/input-state.js b/web/input/input-state.js
--- a/web/input/input-state.js
+++ b/web/input/input-state.js
@@ -16,8 +16,9 @@
serverID: ?string,
// Pending uploads are assigned a messageID once they are sent
messageID: ?string,
- // This is set to truthy if the upload fails for whatever reason
- failed: ?string,
+ // This is set to true if the upload fails for whatever reason
+ failed: boolean,
+ failureMessage?: string,
file: File,
mediaType: MediaType,
dimensions: ?Dimensions,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 7, 10:23 PM (3 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5845252
Default Alt Text
D4891.1765146226.diff (1 KB)
Attached To
Mode
D4891: [web] Make `failed` `boolean` in `PendingMultimediaUpload`
Attached
Detach File
Event Timeline
Log In to Comment