change default route when export

change default route when export

aaiglesias85aaiglesias85 Posts: 25Questions: 8Answers: 0
edited March 2018 in Free community support

When I export I want to save the result in a route, how can I change that route

$('#table').DataTable({

    dom: 'Bfrtip',
    buttons: [{
      extend: 'pdf',
      title: 'table',
      filename: 'table'
    }]
  });

Thank you

Replies

  • colincolin Posts: 15,116Questions: 1Answers: 2,583

    Hi aaiglesias85,

    Sorry if I'm being dim, but I don't understand what you mean by route. Could you explain, please,

    Cheers,

    Colin

  • aaiglesias85aaiglesias85 Posts: 25Questions: 8Answers: 0

    Hello Colin, thanks for answering

    When I export to pdf it is saved by default in a route, but I would like the user to choose the place where he wants to save the document

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    That is up to your user. The download appears as a ribbon on the bottom of the browser and the user decides what to do with it (open, save, or save ask...). You do not really have access to the client machine so you do not really control where the file is saved to.

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    By route, we are assuming you mean path.

  • aaiglesias85aaiglesias85 Posts: 25Questions: 8Answers: 0

    Hi bindrid ,
    Thank you very much for answering the route mean path
    regards

  • aaiglesias85aaiglesias85 Posts: 25Questions: 8Answers: 0

    I wanted something like this, I saw how it is, thank you![]

    (https://datatables.net/forums/uploads/editor/a8/uwjhctzjn5d3.jpg "")

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    In chrome, not with datatables, click on the "Customize and Control Chrome" button. Click on Settings.
    Click on Advance to expand that section.
    Scroll down to Download Section.
    click on the "Ask where to save each file before downloading" button to turn on the prompt.

    Now you will see it every time you do the download.

    Again, this is a browser setting, not controlled by the web page.

  • aaiglesias85aaiglesias85 Posts: 25Questions: 8Answers: 0

    Thank you very much for your help, resolved, thank you

  • aaiglesias85aaiglesias85 Posts: 25Questions: 8Answers: 0

    Hello bindrid

    How do I mark that your answer is correct?

    Regards

This discussion has been closed.