Closed benny-adiwijaya closed 3 years ago
Hi @benny-adiwijaya, it is elFinder client that does not send the Authorization header when requesting files download. As current, you can implement the following steps to enable it:
Use Cookies authentication since it is automatically sent along with the request.
FilesController
, if the conResult.response
is of type Zipdl1stResponse
, then customize the conResult.response.file
by adding a specific hash of the real file
value, e.g: original: file_AS215.tmp --> {yourHashOfFile}___file_AS215.tmpcmd.Query
with a clone and an adjustment of the targets[1] value to the original file
value (without the {yourHashOfFile}___).Sorry for the inconvenience but it is the only two solutions I can think of.
Thank you for your answer.. I think I'm gonna get rid the AuthorizeAttribute
Hi,
I have a problem when download file. I'm using Blazor and web token authentication using customHeaders. The problem is that I cant download any file from Elfinder.
The browser says, "Failed - Needs authorization." I don't get any errors in the browser console nor network tab. I tested the API with Postman (and web token), and everything is fine.
I think customHeaders are not included when I try to download from elfinder, have you any idea to solve this problem? Thank you