Open hwanideveloper opened 3 years ago
Before that, try to put your code in markdown code style, refer this to learn markdown https://guides.github.com/features/mastering-markdown/
And, what's the error if you delete the image preloaded from the server?
sorry! I don't know Markdown well.
I don't know why files preloaded from the server are not deleted. However, I successfully defined the deletion url and deleted it using axios.
The source code is as follows.
deleteUploadedFile: function (fileRecord) {
// Using the default uploader. You may use another uploader instead.
this.actionDeleteFile(fileRecord)
},
async actionDeleteFile(fileRecord) {
const fineInfo = {
fileName : fileRecord.savedFileName,
filePath : fileRecord.filePath
}
await deleteFilePost(fineInfo)
},
You need to set uploadData
. Please see this issue: #57 for explanation
Thank you. It works with uploadData.
deleteUploadedFile: function(fileRecord){
let uploadUrl = this.uploadUrl + '/' + fileRecord.name();
let uploadData = { someFileId: ‘someId’ };
this.$refs.documentsRef.deleteUpload(uploadUrl, this.uploadHeaders, fileRecord, uploadData);
Hello! Deleting images after uploading works fine. However, deleting images preloaded from the server does not work. Is there a way?