As of my last knowledge update in January 2022, directly detecting ongoing upload sessions in SharePoint using the Microsoft Graph API can be challenging. The observed behavior of a file's size changing after upload completion might provide an indirect signal, but distinguishing between an ongoing upload and an empty file is not straightforward. Consider exploring alternative strategies such as monitoring file changes or implementing delays before moving folders to address potential issues with ongoing uploads. Always stay updated with the latest Microsoft Graph API documentation for any new features or improvements.
How can I see all open upload sessions under a SharePoint/Team Site Folder?
I have flows and scripts that automatically move files/folders under a SharePoint/Team Site if they meet a certain criteria. This works well except for a case in which a folder is moved while a user is still uploading files to that folder. The upload would fail because the folder no longer exists.
I would like to know if there are any ways to detect upload sessions opened under a site or folder so that the script can wait for them to complete before moving the folder.
Using the Graph API, I noticed that a when a large file is being uploaded, a driveItem of size 0 is initially created and the size changes after the upload is completed. However, I don't see a way to differentiate between a file currently being uploaded and an empty file.
2 answers
Sort by: Most helpful
-
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
1 deleted comment
Comments have been turned off. Learn more