1

I cannot seem to figure this out. I wrote a HTML5 script and I keep getting auto download to default folder.

HTML5 code :

<a href="../admin/gambar/<?php echo $row['file']; ?>" class="btn btn-success" role="button" download>

So, what code to select a destination folder first and then download the file ?

Thank you.

Junior PHP
  • 21
  • 1
  • 4

1 Answers1

2

The destination of the 'download' is controlled by browser and you may not modify or even get the information via pure JavaScript code (exposing user's file system info is a security risk to browser), read more on Download A File At Different Location Using HTML5

Imagine that one stores his downloads at C:\CompanyName\RealName\PhoneNumber\Adress\

Edit 1-

This is a browser behavior that auto-download file to the default folder, like Google Chrome you could see this help article https://support.google.com/chrome/answer/95759?hl=en-GB&ref_topic=14681

Shinjo
  • 677
  • 6
  • 22
Zay Lau
  • 1,856
  • 1
  • 10
  • 17