Forum Discussion
Using Flow with SharePoint Library - file copy executed before file upload is complete
- Jan 18, 2019
Hi 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:
- Trigger - When a file is created (properties only)
- Action - Initialise variable: Created a boolean called FileUploaded and a default value of false
- Control - Do until: FileUploaded = true
- Action - Get file metadata (this has to be done each time to ensure that we're looking at a fresh set of data
- Condition - If Size (from get file metadata) is not equal to 0
- If Yes: Set Variable "FileUploaded" to true
- If No: Delay for 10 seconds
- Action: Move File
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.
Hi 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:
- Trigger - When a file is created (properties only)
- Action - Initialise variable: Created a boolean called FileUploaded and a default value of false
- Control - Do until: FileUploaded = true
- Action - Get file metadata (this has to be done each time to ensure that we're looking at a fresh set of data
- Condition - If Size (from get file metadata) is not equal to 0
- If Yes: Set Variable "FileUploaded" to true
- If No: Delay for 10 seconds
- Action: Move File
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.
- LookslikerainJun 22, 2020Copper Contributor
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?
- DPapandriaJan 20, 2019Copper Contributor
That works perfectly. Thanks very much!!