Jan 16 2019 12:05 PM
Trying to use Flow to move video files submitted to a "dead drop" folder into a controlled-access folder within a SharePoint Online document collection.
Essentially, a user drags a video file onto the dead drop (displayed in a browser) to initiate the upload and it gets whisked away into a locked down folder afterward. There is also an email alert that seems to be working fine.
The trigger When a file is created (properties only) fires when the upload starts, so the file isn't ready to be copied when the Flow starts. If I insert a static Delay that's long enough for the upload to complete, all is well.
The problem is my files are potentially a few GB in size and the upload time will be highly variable. If the Delay is too short, the remainder of the actions execute on the partially-uploaded file, with a BadRequest error.
I've tried testing the Modified property of the target file in a Do until loop, in the hope that the modification date and time are updated as the upload progresses and can thus be used as a progress counter - that's not working.
For the record, I've tried these other things with comparable results:
So is there any way to test to see if the uploaded file is "all there" after my When a file is created (properties only) trigger fires? Is there a property that gets applied only after the upload is complete that I can wait for or a better trigger to use to start the Flow? Is there just some better way to re-route large uploaded files into a locked-down folder?
Jan 18 2019 12:31 PM
SolutionHi @DPapandria
The key indicator as to whether your file has uploaded or not is the file size. Until the upload is complete, the file size will be 0. As soon as it's complete you'll see the actual size. I tested this on a 400MB file.
So I have shaped a Flow to look like the following:
See my attached screenshot for an example.
The thing to remember is that the loop will only run through 60 iterations, so ensure that you select your delay to give your file enough time to upload.
Hope this helps.
Jan 20 2019 10:56 AM
That works perfectly. Thanks very much!!
Jun 22 2020 03:21 AM
I am trying to replicate this flow, the section i am stuck on is the "get file Metadata",
The is asking for a file identifier i have tried ID and name but this errors stating the file does not exist.
Can you let me know the values the get file metadata is expecting please?
Jan 18 2019 12:31 PM
SolutionHi @DPapandria
The key indicator as to whether your file has uploaded or not is the file size. Until the upload is complete, the file size will be 0. As soon as it's complete you'll see the actual size. I tested this on a 400MB file.
So I have shaped a Flow to look like the following:
See my attached screenshot for an example.
The thing to remember is that the loop will only run through 60 iterations, so ensure that you select your delay to give your file enough time to upload.
Hope this helps.