Search...
onFileDescriptorFileFailed( )
Developer Preview
Triggered when a file fails during post-upload processing.
Syntax
function wixMediaSiteMedia_onFileDescriptorFileFailed(event: FileDescriptorFileFailed): void
onFileDescriptorFileFailed Parameters
NAME
TYPE
DESCRIPTION
event
Optional
FileDescriptorFileFailed
Information about the failed file and metadata for the event.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
An event that triggers when a file fails during essential post-upload processing
Copy Code
1// Place this code in the events.js file2// of your site's Backend section.3// Add the file if it doesn't exist.45export function wixMediaSiteMedia_onFileDescriptorFileFailed(event) {6 const eventTime = event.metadata.eventTime;7 const entityId = event.metadata.entityId;89 console.log(`File with ID ${entityId} failed during essential post-upload processing at ${eventTime}.`);10}1112/* Full event object:13 * {14 * "data": {15 * "externalInfo": {}16 * },17 * "metadata": {18 * "entityId": "d4dde1_f6660fb1274c41bf87514db2f5926ae0",19 * "eventTime": "2023-09-18T10:27:33.046Z",20 * "id": "8cf0189d-9f49-45c5-9f3c-bc7928a42e34",21 * "triggeredByAnonymizeRequest": false22 * }23 * }24 */