How to get the file in my server method when i delete it?

Web Tips Q & ACategory: Krajee PluginsHow to get the file in my server method when i delete it?
Anonymous asked 2 years ago

First of all,great plugins,thank you! And please forgive me for my poor English. I have a problem troubling me a week.so i really need some help.this is my Plugin Options for testing:

uploadUrl : 'WSUpload',
initialPreview : ["<img class='file-preview-image' src='upload/1194980094dd344f1ao.jpg'>"],
initialPreviewConfig : [{url : 'WSDelete'}]

So,when i upload something,it enters into my server method “WSUpload”, then i get the file. Everything is good. And when i click the “delete” icon, it enters into my server method “WSDelete” too,but i can’t get the file what i want to delete.In other words, when I delete something, I only enter my server method carrying nothing! I really want to get the file in my server method when i delete it.thanks. Please help me.

1 Answers
Best Answer
Kartik Staff answered 2 years ago

Read documentation for delete url. You must set the key property for each file that  will identify the file within the initialPreviewConfig and which will be returned via the ajax delete action. One of deleteUrl or initalPreviewConfig.url must be set for the url. You can also set deleteExtraData or initialPreviewConfig.extra to pass additional data to your ajax delete action.

Login or register to contribute or comment.

Login   Register