Skip to main content

delete

Delete file from oneentry cloud storage.

FileUploading?.delete( filename?, fileQuery? );

Minimal example

const fileQuery = {?
"type": "page",?
"entity": "editor",?
"id": 3787,?
}

const value = await FileUploading.delete('file.png', fileQuery)
Schema

filename: string
File name
example: "file.png"

fileQuery: IUploadingQuery
Optional set query parameters
example:

{
"type": "page",
"entity": "editor",
"id": 3787,
"template": 1
}

type(required): string
Type, determines the folder name in the storage.
example: "page"

entity(required): string
Entity name from which the file is uploaded, determines the folder name in the storage.
example: "editor"

id(required): number
Identifier of the object from which the file is uploaded, determines the folder name in the storage.
example: 3787

width: number
Width parameter.
example: 0

height: number
Height parameter.
example: 0

compress: boolean
Flag of optimization (compression) for images.
example: true

This void method delete a file from the cloud file storage.