Lewati ke konten utama

hapus

Hapus file dari penyimpanan cloud oneentry.

Deskripsi

Metode void ini menghapus file dari penyimpanan file cloud.

FileUploading.delete(

filename*, fileQuery

);

Skema parameter

Skema

filename(wajib): string
Nama file
contoh: "file.png"

fileQuery: IUploadingQuery
Parameter kueri set opsional
contoh:

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

fileQuery.type(wajib): string
Jenis, menentukan nama folder di penyimpanan.
contoh: "page"

fileQuery.entity(wajib): string
Nama entitas dari mana file diunggah, menentukan nama folder di penyimpanan.
contoh: "editor"

fileQuery.id(wajib): number
Identifikasi objek dari mana file diunggah, menentukan nama folder di penyimpanan.
contoh: 3787

fileQuery.width: number
Parameter lebar.
contoh: 0

fileQuery.height: number
Parameter tinggi.
contoh: 0

fileQuery.compress: boolean
Flag optimasi (kompresi) untuk gambar.
contoh: true

Contoh

Contoh minimal


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

const response = await FileUploading.delete('file.png', fileQuery);