Custom file uploads in Editor.

Custom file uploads in Editor.

jarrettjjarrettj Posts: 13Questions: 4Answers: 0

Hi,

Good day.

Kudos for a good product so far.

I've hit a brick wall. Need to upload files via the Editor. But not using the PHP library. There are relationships which would be too much work to have to let datatables handle it. Busy working in Zend Framework at the moment.

Tried using the ajax field, but the issue with that is I would have to handle all actions in the datatable. Currently I simply json encode the datatable content and process it on the server side one record at a time. That works well.

Are there any examples posting the files uploaded and processing them manually? If I turn ajax off I get an error that it is required for the file upload to work.

Tried a simple custom field that was a file upload input but then the file goes nowhere. Not sure how to proceed. Any assistance would be much appreciated. Thanks.

Regards.
Jarrett

Answers

  • jarrettjjarrettj Posts: 13Questions: 4Answers: 0
    edited October 2020

    One step closer, spent some time figuring out what the js expects back from the server. All seems good using ajax :-D. You can close this question.

    Can't seem to get the editor.file() function to work. But at least the files are uploading.

    Regards.
    Jarrett

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin

    Hi Jarrett,

    The communication between the client and server used for Editor's file upload is documented here. When returning JSON data about the file in the structure described there the file() method should then work.

    What are you currently having it return?

    Allan

This discussion has been closed.