Issue with File Download Redirect in TypeScript React Example
nickst97 opened this issue · 1 comments
Issue Description:
I have followed the example code provided in the file-picking/typescript-react
repository for file picking. The code is identical to the example given.
The problem I am facing happens after selecting a file (in my case, a .xlsx file). That file gets selected and loaded without any issues, and the file's thumbnail also appears as expected. However, when I click the download button to download the file, it redirects me to my OneDrive folder and then to the online version of the file.
Is this the intended behaviour of the file download functionality in this example? There may be an issue with the download process.
Steps to Reproduce:
- Clone the
file-picking/typescript-react
repository. - Follow the example code for file picking.
- Select a .xlsx file.
- Click the download button.
Expected Behavior:
Clicking the download button should initiate the download of the selected file directly without any unexpected redirects.
Actual Behavior:
Clicking the download button redirects me to my OneDrive folder and then opens the online version of the file.
Please let me know if there's any additional information needed to address this issue.
The samples are just meant to show various possibilities for working with the picker. In this case we grab the webDavUrl
off the item and use that as a shortcut for downloads. In this case the webDavUrl for MS owned office file types appears to redirect to the online experience. You could make additional request to get the download url and other item information to make whatever url you need.