Triggered when a file fails during post-upload processing.
function wixMediaSiteMedia_onFileDescriptorFileFailed(
event: FileDescriptorFileFailed,
): void;
Information about the failed file and metadata for the event.
// Place this code in the events.js file
// of your site's Backend section.
// Add the file if it doesn't exist.
export function wixMediaSiteMedia_onFileDescriptorFileFailed(event) {
const eventTime = event.metadata.eventTime;
const entityId = event.metadata.entityId;
console.log(
`File with ID ${entityId} failed during essential post-upload processing at ${eventTime}.`,
);
}
/* Full event object:
* {
* "data": {
* "externalInfo": {}
* },
* "metadata": {
* "entityId": "d4dde1_f6660fb1274c41bf87514db2f5926ae0",
* "eventTime": "2023-09-18T10:27:33.046Z",
* "id": "8cf0189d-9f49-45c5-9f3c-bc7928a42e34",
* "triggeredByAnonymizeRequest": false
* }
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.