> 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
# ListDeletedFiles
# Package: mediaManager
# Namespace: FilesService
# Method link: https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/list-deleted-files.md
## Permission Scopes:
Read Media Manager: SCOPE.DC-MEDIA.READ-MEDIAMANAGER
## Introduction
Retrieves a list of files in the Media Manager's trash bin.
>**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
---
## REST API
### Schema
```
Method: listDeletedFiles
Description: Retrieves a list of files in the Media Manager's trash bin. >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
URL: https://www.wixapis.com/site-media/v1/trash-bin/files
Method: GET
Method parameters:
query param name: mediaTypes | type: array | description: File media type.
- enum: UNKNOWN, IMAGE, VIDEO, AUDIO, DOCUMENT, VECTOR, ARCHIVE, MODEL3D, OTHER
param name: paging | type: CursorPaging
- name: limit | type: integer | description: Maximum number of items to return in the results.
- name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.
query param name: parentFolderId | type: parentFolderId | description: GUID of the file's parent folder. Default: `media-root`.
query param name: private | type: private | description: \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files.md).
param name: sort | type: Sorting
- name: fieldName | type: string | description: Name of the field to sort by.
- name: order | type: SortOrder | description: Sort order.
- enum: ASC, DESC
Return type: ListDeletedFilesResponse
- name: files | type: array | description: List of files in the Media Manager's trash bin.
- name: id | type: string | description: File GUID. Generated when a file is uploaded to the Media Manager.
- name: displayName | type: string | description: File name as it appears in the Media Manager.
- name: url | type: string | description: Static URL of the file.
- name: parentFolderId | type: string | description: GUID of the file's parent folder.
- name: hash | type: string | description: File hash.
- name: sizeInBytes | type: string | description: Size of the uploaded file in bytes.
- name: private | type: boolean | description: Whether the file is public or private. Learn more about [private files](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files.md).
- name: mediaType | type: MediaType | description: Media file type.
- enum: UNKNOWN, IMAGE, VIDEO, AUDIO, DOCUMENT, VECTOR, ARCHIVE, MODEL3D, OTHER
- name: media | type: FileMedia | description: Media file content.
- ONE-OF:
- name: image | type: ImageMedia | description: Information about the image.
- name: image | type: Image | description: Image data.
- name: id | type: string | description: WixMedia image GUID.
- name: url | type: string | description: Image URL.
- name: height | type: integer | description: Original image height.
- name: width | type: integer | description: Original image width.
- name: altText | type: string | description: Image alt text.
- name: filename | type: string | description: Image filename.
- name: colors | type: Colors | description: Image colors.
- name: prominent | type: Color | description: Main color of the image.
- name: hex | type: string | description: HEX color.
- name: rgb | type: ColorRGB | description: RGB color.
- name: r | type: integer | description: Red channel.
- name: g | type: integer | description: Green channel.
- name: b | type: integer | description: Blue channel.
- name: palette | type: array | description: Color palette of the image.
- name: faces | type: array | description: Information about faces in the image. Use to crop images without cutting out faces.
- name: confidence | type: number | description: The accuracy percentage of the face recognition. The likelihood that a face is detected.
- name: x | type: integer | description: Top left x pixel coordinate of the face.
- name: y | type: integer | description: Top left y pixel coordinate of the face.
- name: height | type: integer | description: Face pixel height.
- name: width | type: integer | description: Face pixel width.
- name: previewImage | type: Image | description: Information about the image preview. You can use this to display a preview for private images.
- name: caption | type: string | description: Optional, An AI generated description of the image
- name: video | type: VideoV2 | description: Information about the video.
- name: id | type: string | description: WixMedia GUID.
- name: resolutions | type: array | description: Available resolutions for the video, starting with the optimal resolution.
- name: url | type: string | description: Video URL.
- name: height | type: integer | description: Video height.
- name: width | type: integer | description: Video width.
- name: format | type: string | description: Video format Possible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm' '720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm', 'hls' ]
- name: filename | type: string | description: Video filename.
- name: audio | type: AudioV2 | description: Information about the audio.
- name: id | type: string | description: WixMedia GUID.
- name: assets | type: array | description: Audio formats available for this file.
- name: id | type: string | description: WixMedia GUID.
- name: url | type: string | description: Audio URL.
- name: filename | type: string | description: Audio filename.
- name: bitrate | type: integer | description: Audio bitrate.
- name: format | type: string | description: Audio format.
- name: duration | type: integer | description: Audio duration in seconds.
- name: sizeInBytes | type: string | description: Audio size in bytes.
- name: document | type: Document | description: Information about the document.
- name: id | type: string | description: WixMedia GUID.
- name: url | type: string | description: Document URL.
- name: filename | type: string | description: Document filename.
- name: vector | type: ImageMedia | description: Information about the vector.
- name: archive | type: Archive | description: Information about the archive.
- name: id | type: string | description: WixMedia GUID.
- name: url | type: string | description: Archive URL.
- name: urlExpirationDate | type: string | description: Archive URL expiration date (when relevant).
- name: sizeInBytes | type: string | description: Archive size in bytes.
- name: filename | type: string | description: Archive filename.
- name: model3d | type: Model3D | description: Information about the 3D Model.
- name: id | type: string | description: WixMedia 3D GUID.
- name: url | type: string | description: 3D URL.
- name: thumbnail | type: Image | description: 3D thumbnail Image
- name: altText | type: string | description: 3D alt text.
- name: urlExpirationDate | type: string | description: 3D URL expiration date (when relevant).
- name: filename | type: string | description: 3D filename.
- name: sizeInBytes | type: string | description: 3D size in bytes.
- name: operationStatus | type: OperationStatus | description: Status of the file that was uploaded.
- enum:
- FAILED: The file failed to upload, for example, during media post processing.
- READY: The file uploaded, finished all processing, and is ready for use.
- PENDING: The file is processing and the URLs are not yet available. This response is returned when importing a file.
- name: sourceUrl | type: string | description: URL where the file was uploaded from.
- name: thumbnailUrl | type: string | description: URL of the file's thumbnail.
- name: labels | type: array | description: Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images.
- name: createdDate | type: string | description: Date and time the file was created.
- name: updatedDate | type: string | description: Date and time the file was updated.
- name: siteId | type: string | description: The Wix site GUID where the media file is stored.
- name: state | type: State | description: State of the file.
- enum:
- OK: File is ready for consumption
- DELETED: Deleted file
- name: nextCursor | type: PagingMetadataV2 | description: The next cursor if it exists.
- name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.
- name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.
- name: next | type: string | description: Cursor string pointing to the next page in the list of results.
Possible Errors:
HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNSUPPORTED_SORT_VALUE | Description: Sort value isn't supported.
HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNSUPPORTED_MEDIA_TYPE | Description: Media type isn't supported for filtering.
```
### Examples
### List files in the Media Manager's trash bin
This example sorts by `updatedDate` in `DESC` order with a paging limit of 2.
```curl
curl -X GET \
'https://www.wixapis.com/site-media/v1/trash-bin/files?sort.fieldName=updateDate&sort.order=DESC&paging.limit=2' \
-H 'Authorization: '
```
---
## JavaScript SDK
### Schema
```
Method: wixClientAdmin.mediaManager.FilesService.listDeletedFiles(options)
Description: Retrieves a list of files in the Media Manager's trash bin. >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
Method parameters:
param name: options | type: ListDeletedFilesOptions none
- name: parentFolderId | type: string | description: GUID of the file's parent folder. Default: `media-root`.
- name: mediaTypes | type: array | description: File media type.
- enum: UNKNOWN, IMAGE, VIDEO, AUDIO, DOCUMENT, VECTOR, ARCHIVE, MODEL3D, OTHER
- name: private | type: boolean | description: \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files.md).
- name: sort | type: Sorting | description: Field name and order to sort by. One of: * `displayName` * `updatedDate` * `sizeInBytes` Default: `updatedDate` in `desc` order.
- name: fieldName | type: string | description: Name of the field to sort by.
- name: order | type: SortOrder | description: Sort order.
- enum: ASC, DESC
- name: paging | type: CursorPaging | description: Cursor and paging information.
- name: limit | type: integer | description: Maximum number of items to return in the results.
- name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.
Return type: PROMISE
- name: files | type: array | description: List of files in the Media Manager's trash bin.
- name: _id | type: string | description: File GUID. Generated when a file is uploaded to the Media Manager.
- name: displayName | type: string | description: File name as it appears in the Media Manager.
- name: url | type: string | description: Static URL of the file.
- name: parentFolderId | type: string | description: GUID of the file's parent folder.
- name: hash | type: string | description: File hash.
- name: sizeInBytes | type: string | description: Size of the uploaded file in bytes.
- name: private | type: boolean | description: Whether the file is public or private. Learn more about [private files](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files.md).
- name: mediaType | type: MediaType | description: Media file type.
- enum: UNKNOWN, IMAGE, VIDEO, AUDIO, DOCUMENT, VECTOR, ARCHIVE, MODEL3D, OTHER
- name: media | type: FileMedia | description: Media file content.
- ONE-OF:
- name: image | type: ImageMedia | description: Information about the image.
- name: image | type: string | description: Image data.
- name: colors | type: Colors | description: Image colors.
- name: prominent | type: Color | description: Main color of the image.
- name: hex | type: string | description: HEX color.
- name: rgb | type: ColorRGB | description: RGB color.
- name: r | type: integer | description: Red channel.
- name: g | type: integer | description: Green channel.
- name: b | type: integer | description: Blue channel.
- name: palette | type: array | description: Color palette of the image.
- name: faces | type: array | description: Information about faces in the image. Use to crop images without cutting out faces.
- name: confidence | type: number | description: The accuracy percentage of the face recognition. The likelihood that a face is detected.
- name: x | type: integer | description: Top left x pixel coordinate of the face.
- name: y | type: integer | description: Top left y pixel coordinate of the face.
- name: height | type: integer | description: Face pixel height.
- name: width | type: integer | description: Face pixel width.
- name: previewImage | type: string | description: Information about the image preview. You can use this to display a preview for private images.
- name: caption | type: string | description: Optional, An AI generated description of the image
- name: video | type: string | description: Information about the video.
- name: audio | type: AudioV2 | description: Information about the audio.
- name: _id | type: string | description: WixMedia GUID.
- name: assets | type: array | description: Audio formats available for this file.
- name: bitrate | type: integer | description: Audio bitrate.
- name: format | type: string | description: Audio format.
- name: duration | type: integer | description: Audio duration in seconds.
- name: sizeInBytes | type: string | description: Audio size in bytes.
- name: document | type: string | description: Information about the document.
- name: vector | type: ImageMedia | description: Information about the vector.
- name: archive | type: Archive | description: Information about the archive.
- name: _id | type: string | description: WixMedia GUID.
- name: url | type: string | description: Archive URL.
- name: urlExpirationDate | type: Date | description: Archive URL expiration date (when relevant).
- name: sizeInBytes | type: string | description: Archive size in bytes.
- name: filename | type: string | description: Archive filename.
- name: model3d | type: Model3D | description: Information about the 3D Model.
- name: _id | type: string | description: WixMedia 3D GUID.
- name: url | type: string | description: 3D URL.
- name: thumbnail | type: string | description: 3D thumbnail Image
- name: altText | type: string | description: 3D alt text.
- name: urlExpirationDate | type: Date | description: 3D URL expiration date (when relevant).
- name: filename | type: string | description: 3D filename.
- name: sizeInBytes | type: string | description: 3D size in bytes.
- name: operationStatus | type: OperationStatus | description: Status of the file that was uploaded.
- enum:
- FAILED: The file failed to upload, for example, during media post processing.
- READY: The file uploaded, finished all processing, and is ready for use.
- PENDING: The file is processing and the URLs are not yet available. This response is returned when importing a file.
- name: sourceUrl | type: string | description: URL where the file was uploaded from.
- name: thumbnailUrl | type: string | description: URL of the file's thumbnail.
- name: labels | type: array | description: Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images.
- name: _createdDate | type: Date | description: Date and time the file was created.
- name: _updatedDate | type: Date | description: Date and time the file was updated.
- name: siteId | type: string | description: The Wix site GUID where the media file is stored.
- name: state | type: State | description: State of the file.
- enum:
- OK: File is ready for consumption
- DELETED: Deleted file
- name: nextCursor | type: PagingMetadataV2 | description: The next cursor if it exists.
- name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.
- name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.
- name: next | type: string | description: Cursor string pointing to the next page in the list of results.
Possible Errors:
HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNSUPPORTED_SORT_VALUE | Description: Sort value isn't supported.
HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNSUPPORTED_MEDIA_TYPE | Description: Media type isn't supported for filtering.
```
### Examples
### Bulk restores all non-permanently deleted files of chosen types (with $w)
This code is an example of a page on which a visitor chooses a media type (or types). All files of that type/those types in which have been (non-permanently) deleted are restored.
```javascript
/***********************************************
* Backend code - bulk-restore-files.web.js/ts *
**********************************************/
import { Permissions, webMethod } from '@wix/web-methods';
import { files } from '@wix/media';
import { auth } from '@wix/essentials';
export const restoreFiles = webMethod(Permissions.Anyone, async (mediaTypes) => {
let idList = []
try {
const options = {
mediaTypes: mediaTypes
};
const elevatedListDeletedFiles = auth.elevate(files.listDeletedFiles)
const deletedFiles = await elevatedListDeletedFiles(options);
idList = deletedFiles.files.map((file) => {
return file._id
});
} catch (error) {
console.error(error);
}
try {
const elevatedBulkRestoreFilesFromTrashBin = auth.elevate(files.bulkRestoreFilesFromTrashBin);
const restoredFiles = await elevatedBulkRestoreFilesFromTrashBin(idList);
console.log('Restored Files:', restoredFiles);
return restoredFiles;
} catch (error) {
console.error(error);
}
});
/*************
* Page code *
************/
import { restoreFiles } from 'backend/bulk-restore-files.web';
$w.onReady(() => {
$w('#restoreMedia').onClick(async () => {
const mediaTypes = []
if ($w('#image').checked) {
mediaTypes.push("IMAGE")
}
if ($w('#video').checked) {
mediaTypes.push("VIDEO")
}
if ($w('#audio').checked) {
mediaTypes.push("AUDIO")
}
if ($w('#document').checked) {
mediaTypes.push("DOCUMENT")
}
if ($w('#vector').checked) {
mediaTypes.push("VECTOR")
}
if ($w('#archive').checked) {
mediaTypes.push("ARCHIVE")
}
if ($w('#model3d').checked) {
mediaTypes.push("MODEL3D")
}
await restoreFiles(mediaTypes);
$w('#filesRestoredMsg').show();
setTimeout(() => {
$w('#filesRestoredMsg').hide();
}, 5000);
});
});
```
### List deleted files (with elevated permissions)
```javascript
import { files } from '@wix/media';
import { auth } from '@wix/essentials';
const elevatedListDeletedFiles = auth.elevate(files.listDeletedFiles);
async function myListDeletedFilesFunction() {
try {
const deletedFiles = await elevatedListDeletedFiles();
console.log('Files in trash:', deletedFiles)
return deletedFiles;
} catch (error) {
console.error(error);
// Handle the error
}
}
/* Promise resolves to:
* {
* "files": [
* {
* "_createdDate": "2023-08-09T08:45:42.000Z",
* "_id": "d4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png",
* "_updatedDate": "2023-08-09T08:45:42.000Z",
* "displayName": "image1.png",
* "hash": "864d607a1ea270efbac32def181f039f",
* "internalTags": [
* "_fileOrigin_uploaded"
* ],
* "labels": [],
* "media": {
* "image": {
* "colors": {
* "palette": [
* {
* "rgb": {
* "b": 247,
* "g": 247,
* "r": 247
* }
* },
* {
* "rgb": {
* "b": 142,
* "g": 140,
* "r": 140
* }
* },
* {
* "rgb": {
* "b": 192,
* "g": 218,
* "r": 141
* }
* },
* {
* "rgb": {
* "b": 195,
* "g": 137,
* "r": 149
* }
* },
* {
* "rgb": {
* "b": 228,
* "g": 143,
* "r": 183
* }
* },
* {
* "rgb": {
* "b": 250,
* "g": 62,
* "r": 152
* }
* },
* {
* "rgb": {
* "b": 16,
* "g": 16,
* "r": 16
* }
* },
* {
* "rgb": {
* "b": 140,
* "g": 199,
* "r": 60
* }
* },
* {
* "rgb": {
* "b": 120,
* "g": 194,
* "r": 242
* }
* },
* {
* "rgb": {
* "b": 158,
* "g": 203,
* "r": 103
* }
* }
* ],
* "prominent": {
* "rgb": {
* "b": 247,
* "g": 247,
* "r": 247
* }
* }
* },
* "faces": [],
* "image": "wix:image://v1/d4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png/image1.png#originWidth=1170&originHeight=2532"
* }
* },
* "mediaType": "IMAGE",
* "operationStatus": "READY",
* "parentFolderId": "trash-root",
* "private": false,
* "siteId": "3ecba886-4267-11ee-be56-0242ac120002",
* "sizeInBytes": "394945",
* "state": "OK",
* "thumbnailUrl": "https://static.wixstatic.com/media/d4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png",
* "url": "https://static.wixstatic.com/media/d4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png"
* },
* {
* "_createdDate": "2023-08-09T08:45:37.000Z",
* "_id": "d4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg",
* "_updatedDate": "2023-08-09T08:45:37.000Z",
* "displayName": "vectorArt1.svg",
* "hash": "e379083c3675d7f7891da00c0708539c",
* "internalTags": [
* "_fileOrigin_uploaded"
* ],
* "labels": [],
* "media": {
* "image": {
* "faces": [],
* "image": "wix:image://v1/d4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg/vectorArt1.svg#originWidth=1177&originHeight=2501"
* }
* },
* "mediaType": "VECTOR",
* "operationStatus": "READY",
* "parentFolderId": "trash-root",
* "private": false,
* "siteId": "3ecba886-4267-11ee-be56-0242ac120002",
* "sizeInBytes": "119475",
* "state": "OK",
* "thumbnailUrl": "https://static.wixstatic.com/shapes/d4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg",
* "url": "https://static.wixstatic.com/shapes/d4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg"
* }
* ],
* "nextCursor": {
* "cursors": {
* "next": ""
* },
* "hasNext": false
* }
* }
*/
```
### List deleted files
```javascript
import { files } from '@wix/media';
async function myListDeletedFilesFunction() {
try {
const deletedFiles = await files.listDeletedFiles();
console.log('Files in trash:', deletedFiles)
return deletedFiles;
} catch (error) {
console.error(error);
// Handle the error
}
}
/* Promise resolves to:
* {
* "files": [
* {
* "_createdDate": "2023-08-09T08:45:42.000Z",
* "_id": "d4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png",
* "_updatedDate": "2023-08-09T08:45:42.000Z",
* "displayName": "image1.png",
* "hash": "864d607a1ea270efbac32def181f039f",
* "internalTags": [
* "_fileOrigin_uploaded"
* ],
* "labels": [],
* "media": {
* "image": {
* "colors": {
* "palette": [
* {
* "rgb": {
* "b": 247,
* "g": 247,
* "r": 247
* }
* },
* {
* "rgb": {
* "b": 142,
* "g": 140,
* "r": 140
* }
* },
* {
* "rgb": {
* "b": 192,
* "g": 218,
* "r": 141
* }
* },
* {
* "rgb": {
* "b": 195,
* "g": 137,
* "r": 149
* }
* },
* {
* "rgb": {
* "b": 228,
* "g": 143,
* "r": 183
* }
* },
* {
* "rgb": {
* "b": 250,
* "g": 62,
* "r": 152
* }
* },
* {
* "rgb": {
* "b": 16,
* "g": 16,
* "r": 16
* }
* },
* {
* "rgb": {
* "b": 140,
* "g": 199,
* "r": 60
* }
* },
* {
* "rgb": {
* "b": 120,
* "g": 194,
* "r": 242
* }
* },
* {
* "rgb": {
* "b": 158,
* "g": 203,
* "r": 103
* }
* }
* ],
* "prominent": {
* "rgb": {
* "b": 247,
* "g": 247,
* "r": 247
* }
* }
* },
* "faces": [],
* "image": "wix:image://v1/d4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png/image1.png#originWidth=1170&originHeight=2532"
* }
* },
* "mediaType": "IMAGE",
* "operationStatus": "READY",
* "parentFolderId": "trash-root",
* "private": false,
* "siteId": "3ecba886-4267-11ee-be56-0242ac120002",
* "sizeInBytes": "394945",
* "state": "OK",
* "thumbnailUrl": "https://static.wixstatic.com/media/d4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png",
* "url": "https://static.wixstatic.com/media/d4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png"
* },
* {
* "_createdDate": "2023-08-09T08:45:37.000Z",
* "_id": "d4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg",
* "_updatedDate": "2023-08-09T08:45:37.000Z",
* "displayName": "vectorArt1.svg",
* "hash": "e379083c3675d7f7891da00c0708539c",
* "internalTags": [
* "_fileOrigin_uploaded"
* ],
* "labels": [],
* "media": {
* "image": {
* "faces": [],
* "image": "wix:image://v1/d4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg/vectorArt1.svg#originWidth=1177&originHeight=2501"
* }
* },
* "mediaType": "VECTOR",
* "operationStatus": "READY",
* "parentFolderId": "trash-root",
* "private": false,
* "siteId": "3ecba886-4267-11ee-be56-0242ac120002",
* "sizeInBytes": "119475",
* "state": "OK",
* "thumbnailUrl": "https://static.wixstatic.com/shapes/d4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg",
* "url": "https://static.wixstatic.com/shapes/d4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg"
* }
* ],
* "nextCursor": {
* "cursors": {
* "next": ""
* },
* "hasNext": false
* }
* }
*/
```
### listDeletedFiles (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).
```javascript
import { createClient } from '@wix/sdk';
import { files } from '@wix/media';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed
const myWixClient = createClient ({
modules: { files },
// Include the auth strategy and host as relevant
});
async function listDeletedFiles(options) {
const response = await myWixClient.files.listDeletedFiles(options);
};
```
---