cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
paul_culmsee
Level 8

SharePoint Create FIle action does not work for asset library

Hi

 

I have a flow that creates an MP4 file in a SharePoint Asset library and I think since this library has specific features for video content (eg renditions) the action will fail.

 


{
  "status": 404,
  "message": "File Not Found.\r\nclientRequestId: cc31e789-af7f-4da1-aabb-18b9ed8736db",
  "source": "https://tenant.sharepoint.com//_api/web/GetFolderByServerRelativePath(decodedUrl=@p)/files/add(url=@...'",
  "errors": [
    "-2147024894",
    "System.IO.FileNotFoundException"
  ]
}

 

Now the file actually does get uploaded, but the URL of that file seems to change, and is related to renditions. Eg.. when I look at the manage renditions for the uploaded video the URL becomes...

 

https://culmsee.sharepoint.com/Pics/311-28_08_17-1/311-28_08_17-1.mp4

https://culmsee.sharepoint.com/Pics/311-28_08_17-1?d=wcbfe0586770b464cbd45b0e93081a29a

 

So the Create File flow action does not take into account the Asset library specifics. 

 

I changed the code to upload to a Document library instead of Asset library and then the action works fine. But the entire point of the asset library is to support rich media, so it would be create to see the Create FIle action be asset library aware.

 

It is also worth noting that images are not affected - only videos.

 

Paul

 

 

2 REPLIES 2
spg-john-liu
Level 8

Re: SharePoint Create FIle action does not work for asset library

For Flow engineers - when uploading a movie to a SharePoint Asset Library, a feature receiver kicks in, creates a folder and moves the movie file underneath it.

 

@paul_culmsee

I think this one needs a workaround - add a delay after the upload and then try to re-query the file from the filename.

paul_culmsee
Level 8

Re: SharePoint Create FIle action does not work for asset library

I can work around it using the method you describe @spg-john-liu but the "Create Item" action always retuirns failed, so we now need to tell flow to ignore errors... hence I hope the flow engineers account for this scenario, espeically since the Create File action is (to my knowledge) being revisitied so it returns the itemID as part of the call, saving us the need to use the Get Items call which is already hacky...

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 199 members 4,500 guests
Please welcome our newest community members: