> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: onFileUploaded(event: FileEvent) # Method package: wixMediaBackend # Method menu location: wixMediaBackend --> Events --> onFileUploaded # Method Link: https://dev.wix.com/docs/velo/apis/wix-media-backend/events/on-file-uploaded.md # Method Description: An event that triggers when a file has completed uploading. The `onFileUploaded()` event handler runs when a file has been uploaded to to the Media Manager using the [`importFile()`](https://dev.wix.com/docs/velo/apis/wix-media-backend/media-manager/import-file.md), [`upload()`](https://dev.wix.com/docs/velo/apis/wix-media-backend/media-manager/upload.md) function, or the URL returned by the [`getUploadUrl()`](https://dev.wix.com/docs/velo/apis/wix-media-backend/media-manager/get-upload-url.md) function. The `FileEvent` object contains information about the uploaded file and the upload context. > **Note:** Backend events don't work when previewing your site. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event when a file has been uploaded ```javascript // Place this code in the events.js file // of your site's Backend section. export function wixMediaManager_onFileUploaded(event) { let allFileInfo = event.fileInfo; let fileUrl = event.fileInfo.fileUrl; let mediaHeight = event.fileInfo.height; } /* Full event object: * { * "fileInfo": { * "mediaType": "image", * "height": 300, * "sourceUrl": "https://somedomain.com/img/original-name.jpg", * "mimeType": "image/jpeg", * "hash": "Ew00kXbu4Zt33rzjcWa6Ng==", * "opStatus": "READY", * "labels": [ * "Blue", * "Butterfly", * "Turquoise" * ], * "fileUrl": "wix:image://v1/f6c0f9_tg439f4475a749e181dd14407fdbd37e~mv2.jpg/original-name.jpg#originWidth=300&originHeight=300", * "originalFileName": "original-name.jpg", * "sizeInBytes": 51085, * "isPrivate": false, * "width": 300, * "iconUrl": "wix:image://v1/f6c0f9_tg439f4475a749e181dd14407fdbd37e~mv2.jpg/original-name.jpg#originWidth=300&originHeight=300", * "parentFolderId": "2bf470f5be194b319cdb2fvbu3278ff9" * }, * context: { * someKey1: "someValue1", * someKey2: "someValue2" * } * } */ ``` ---