HTML5 Download Attribute to Selected Folder

2019-09-11 06:53发布

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.

标签: html5
1条回答
乱世女痞
2楼-- · 2019-09-11 07:33

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

查看更多
登录 后发表回答