file upload ajax url and editor id value

file upload ajax url and editor id value

daudodaudo Posts: 13Questions: 6Answers: 1

Hi,

I am currently playing with Editor's new file upload features. What I am having difficulty with is a "generic" way to add the main editor's "id" value for the uploaded file.

For the Editor, I can use the id URL parameter as described here: https://editor.datatables.net/reference/option/ajax

For the file upload plugin, I however fail to see such a feature. Am I missing something here?

Thanks

Udo

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,201Questions: 1Answers: 10,414 Site admin
    Answer ✓

    The issue with using the host row's id, is that the user might be creating a new row, and therefore it wouldn't have an id yet!

    If in your application you aren't giving the user the ability to create new rows, then this won't be an issue, but it would require a modification to the upload plug-in to send data about the host row as that isn't something that the plug-in will send currently.

    Regards,
    Allan

  • daudodaudo Posts: 13Questions: 6Answers: 1

    yes, you are right, setting the id make only sense for editing existing records (and that's why I am allowing image uploads only in a second, post creation step).

    Thanks for the clarification.

This discussion has been closed.