File Upload Example Question

File Upload Example Question

redbaronredbaron Posts: 12Questions: 6Answers: 1

In the example for file upload (https://editor.datatables.net/examples/advanced/upload.html) there is a function for the Editor that refers to 'table.file'.

I am trying to recreate this sample using some minor changes, namely NOT using the PHP library helper class, but rather presenting my own Ajax data. The browser is stating that the object "table" is undefined.

My question is, in the example, where is the object table defined? I see that on line 32 there is a var named table, but is that what is used on line #24? Is there any other magic taking place in the PHP library that I am potentially not replicating?

I have tried to attempt to word this question based on the existing example, and as such, have not submitted code. If there is no magic happening with PHP, then I will post up some sample code.

This question has accepted answers - jump to:

Answers

  • redbaronredbaron Posts: 12Questions: 6Answers: 1
    Answer ✓

    I have found the answer to my question. Turns out the AJAX I was recreating was not returning the "files" object, yet I was referencing this data. Now that I am fully returning the objects, I am able to utilize the upload without using the PHP scripts.

    This can be closed.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Thanks for posting back with the update - good to hear that you've got this working now!

    Allan

This discussion has been closed.