multiple image uploader (Delete + edit) DT-edtior
multiple image uploader (Delete + edit) DT-edtior
sarath_surisetty
Posts: 54Questions: 13Answers: 0
hello team
continuation to the discussion at https://datatables.net/forums/discussion/48925/datatables-editor-file-upload-with-spring-boot
->when i click on delete button how to make ajax call to remove the file ?
->on clicking on edit how to reload the paths and call delete.
thanks
sarath
This question has accepted answers - jump to:
This discussion has been closed.
Answers
There is no option for that at this time. The way it currently works is that the reference to the file is removed from the value array for that field. When that value gets written to the database the file that was removed is then orphaned and can be removed.
That isn't a feature of the
uploadMany
input either. If you need that ability, you'd need to create a custom field plug-in.I don't understand why the paths would need to be reloaded on edit?
Allan
hi allan thanks for answering.
I don't understand why the paths would need to be reloaded on edit?
->i mean how to display the images bonded with the parent row,as it is OnetoMany .
Do you mean in the table or in the form?
Allan
in the form.actually the example has this feature:
https://editor.datatables.net/examples/advanced/upload-many.html
but im checking how to implement with spring boot using ajax.
please find attachment for screenshot
From a client-side point of view there shouldn't be any difference from the example you linked to. The
render
function of theuploadMany
callback is the method that will run when the field needs to display an image. In that example it usesfile()
to get file information. Assuming you populate file information into the JSON response, then you can use the same method.Allan