Body: <p>I would like to download asset files from Craft 3 dashboard.</p>
  
  <p>Those files are out of web folder because of security reason.
  I made "documents" folder just under the root of the project, and the files are in there.</p>
  
  <p>However, the function of "download file" does not work, although "preview file" and "Edit image" works.
  I think it is strange.</p>
  
  <p>Do you have any idea to download the private files?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-10T18:47:11.677Z
Comments.Text: I doubt this will be possible without PHP. You'll need to serve the file on your own and let yii2 set the correct headers. But without php there won't be a way since you can't access the original file
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-10T20:42:47.223Z
Comments.Text: Hmm, I don't think you are right. Clearly Craft's built in "Preview
  file" option can access my image, even though it's in a private folder.
  And after inspecting the URL of my image in the Preview window, I can
  see that it has a special "private" URL (e.g.
  http://<host_name>/cpresources/42d9d924/file7.png?v=1554913720). So
  clearly Craft has a way of serving this file, without me doing any
  additional PHP.
Comments.UserDisplayName: Kota.M
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-10T20:42:50.633Z
Comments.Text: So why it doesn't use this link for its "Download file"
  option too? Even better, if I copy and paste myself this private URL in
  my browser, "voila" here is my fully functional download link! Of
  course, we can't expect our clients to download the files this way. This
  clearly looks like a Craft CMS bug.
Comments.UserDisplayName: Kota.M
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-10T20:50:32.630Z
Comments.Text: Please note: I said the original file. Everything in the cp resource folder are just temporary, often croped files. But yeah you can use those too if you like
Comments.UserDisplayName: Robin Schambach
Tags: <craft3><assets>
Title: How to download private assets (without public URL) from dashboard
ThreadText: # How to download private assets (without public URL) from dashboard
  
  (Asked by: username_0 on 2019-04-10)
  
  I would like to download asset files from Craft 3 dashboard.
  
  Those files are out of web folder because of security reason.
  I made "documents" folder just under the root of the project, and the files are in there.
  
  However, the function of "download file" does not work, although "preview file" and "Edit image" works.
  I think it is strange.
  
  Do you have any idea to download the private files?
  
  **Tags:** craft3, assets
  
  > **Comments:**
  > **username_1**: I doubt this will be possible without PHP. You'll need to serve the file on your own and let yii2 set the correct headers. But without php there won't be a way since you can't access the original file  
  > **username_0**: Hmm, I don't think you are right. Clearly Craft's built in "Preview file" option can access my image, even though it's in a private folder. And after inspecting the URL of my image in the Preview window, I can see that it has a special "private" URL (e.g. http://<host_name>/cpresources/42d9d924/file7.png?v=1554913720). So clearly Craft has a way of serving this file, without me doing any additional PHP.  
  > **username_0**: So why it doesn't use this link for its "Download file" option too? Even better, if I copy and paste myself this private URL in my browser, "voila" here is my fully functional download link! Of course, we can't expect our clients to download the files this way. This clearly looks like a Craft CMS bug.  
  > **username_1**: Please note: I said the original file. Everything in the cp resource folder are just temporary, often croped files. But yeah you can use those too if you like  
  
  ---
  
  ## 0 answers
  
  