Skip to content

Error on DownloadFileAsync with sandbox files id #379

Discussion options

You must be logged in to vote

Hi @StephenHodgson,
I'm using the package in a WebAPI. The directory is local (with read/write permission). The problem is the Path.Combine when FileResponse.FileName contains something like "/mnt/data/....". Check my screenshot:

The Path.Combine returns a value that ignore the passed directory and after it try to write the file under C:\mnt\data... with exception. I solved the issue using the RetrieveFileStreamAsync and wrapping the FileResponse.FileName with Path.GetFileName to obtain a valid file path. Thanks for your help.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by StephenHodgson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #378 on November 13, 2024 16:07.