save exported file directly to folder in server

save exported file directly to folder in server

carlito27carlito27 Posts: 14Questions: 4Answers: 0

I'm trying to figure out a way to have a button that basically saves the file (xls, pdf csv...) directly to a directory on the server. I think it could be done with ajax but if anyone here has suggestions please le me know, thanks!

This question has an accepted answers - jump to answer

Answers

  • karliekarlie Posts: 83Questions: 17Answers: 0

    I too am looking for this, not sure if its been done before? I need to export a csv to a directory on the server.

  • karmendrakarmendra Posts: 21Questions: 7Answers: 0

    Was anyone able to achieve this? the thing is I need to save only filtered data to file on my AWS S3. I someone can share ideas to do so it will be a great help. BTW we are using YajraDatatables for Laravel.

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    The export file created by Buttons is created on the client-side. There is no server interaction. If you wanted to then upload that to the server you'd need to add the ability to send the file's binary data to the server via Ajax so the server can save it.

    That is not something that Buttons provides out of the box.

    Generally if you need the file on the server, I would suggest you create the file on the server-side, rather than allowing the user to upload the file.

    Allan

This discussion has been closed.