Inconsistent File Viewing/Rendering via auto-library reload (RenderListDataAsStream) #9930
Open
1 of 9 tasks
Labels
type:bug-suspected
Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
other (enter in the "Additional environment details" area below)
Developer environment
None
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
We are using the Graph API / CSOM to effectively replace an existing file with a stub/link file.
This uses the following Graph API endpoints:
Renames "Filename.docx" to "Filename.docx.url"
PATCH /drives/{drive-id}/items/{item-id} (docs)
Replaces the file content with the URL Shortcut contents
PUT /drives/{drive-id}/items/{item-id}/content (docs)
Deletes all previous version history via CSOM
ListItem.Versions.DeleteAll()
We observe that the Document Library does a reload of the contents and shows the updated file.
However, clicking to view the file behaves differently until the full browser page is refreshed.
For example, the URL file is treated as a file download by the browser. After a page refresh, clicking the URL file will correctly navigate to the URL within the file (desired behaviour).
The same can be seen for a 'txt' file. It is passed off to be rendered by the browser (e.g. displayed in a new tab). After a page refresh, clicking the 'txt' file results in it opening within the SharePoint Text viewer/editor.
Steps to reproduce
Expected behavior
Ideally the behaviour would be consistent, and handled by SharePoint rendering.
The text was updated successfully, but these errors were encountered: