delete
Xóa tệp từ bộ nhớ đám mây oneentry.
Description
Phương thức void này xóa một tệp từ bộ nhớ tệp đám mây.
FileUploading.delete(
filename*,
fileQuery,
fileQuery.type*,
fileQuery.entity*,
fileQuery.id*,
fileQuery.width,
fileQuery.height,
fileQuery.compress
);
Parameters schema
Schema
filename(bắt buộc): string
Tên tệp
ví dụ: "file.png"
fileQuery: IUploadingQuery
Tham số truy vấn tùy chọn
ví dụ:
{
"type": "page",
"entity": "editor",
"id": 3787,
"template": 1
}
fileQuery.type(bắt buộc): string
Loại, xác định tên thư mục trong bộ nhớ.
ví dụ: "page"
fileQuery.entity(bắt buộc): string
Tên thực thể từ đó tệp được tải lên, xác định tên thư mục trong bộ nhớ.
ví dụ: "editor"
fileQuery.id(bắt buộc): number
Định danh của đối tượng từ đó tệp được tải lên, xác định tên thư mục trong bộ nhớ.
ví dụ: 3787
fileQuery.width: number
Tham số chiều rộng.
ví dụ: 0
fileQuery.height: number
Tham số chiều cao.
ví dụ: 0
fileQuery.compress: boolean
Cờ tối ưu hóa (nén) cho hình ảnh.
ví dụ: true
Examples
Minimal example
const fileQuery = { "type": "page", "entity": "editor", "id": 3787,}
const response = await FileUploading.delete('file.png', fileQuery);