> 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: onFolderCreated(event: FolderCreated) # Method package: wixMediaV2 # Method menu location: wixMediaV2 --> onFolderCreated # Method Link: https://dev.wix.com/docs/velo/events-service-plugins/media/events/on-folder-created.md # Method Description: Triggered when a folder is created. This event is also triggered when a folder is restored from the Media Manager's trash bin. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event that triggers when a folder is created ```javascript // 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_onFolderCreated(event) { const displayName = event.entity.displayName; const parentFolderId = event.entity.parentFolderId; const eventTime = event.metadata.eventTime; console.log(`New folder, "${displayName}," was created in the parent folder with ID ${parentFolderId} at ${eventTime}.`); } /* Full event object: * { * "entity": { * "_createdDate": "2023-09-18T10:20:23.000Z", * "_id": "a7b49f96836a48febefb10f669c14ab0", * "_updatedDate": "2023-09-18T10:20:23.000Z", * "displayName": "Videos", * "parentFolderId": "media-root" * }, * "metadata": { * "entityId": "a7b49f96836a48febefb10f669c14ab0", * "eventTime": "2023-09-18T10:20:24.401Z", * "id": "00c0a4d0-1987-4d2f-9cb4-0dec0b969d60", * "triggeredByAnonymizeRequest": false * } * } */ ``` ---