I am trying to load images from SharePoint to an azure blob container via MS Flow. Since recently I start getting errors for some images.
SharePoint with a folder structure of:
Blob Storage with a simulated folder structure:
The Flow which executes the transfer looks like this:
This usually works, but for the following test path:
A Test/Test Location/AUF07539/AUF07539-Nachher/LonglonglonglongLonglonglonglongLonglonglonglongLonglonglonglongLonglonglonglongLonglonglonglongLonglonglonglong.jpg
I recieve the following error:
Action 'Create_blob' failed
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"> <HTML><HEAD><TITLE>Bad Request</TITLE> <META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD> <BODY><h2>Bad Request - Invalid URL</h2> <hr><p>HTTP Error 400. The request URL is invalid.</p> </BODY></HTML>
Surprisingly to me, I can upload the blob without problem if I trigger it manually:
My first suspicion was the length of the blob name, but when I create the blob manually I can choose an arbitrary length and it works. (the max length supported by azure is 1024, I believe)
So now I assume it has something to do with 'Apply to each'. But I simply cannot find any hints on what the problem might be.
I would be grateful for any insights.
Hi @Jek ,
Please take a try to add a file extension to the file name in the Set variable action to see if the issue still exists.
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for the response!
The variable "Name" at the end already contains the file extension.
I am quite sure the problem has to do with the "apply to each" step.
The strange thing is that the lenght of the path name seems to be the deciding factor wether it works or not. From my research path names below 182 characters work, and every thing above that doesn't.
This seems like an arbitrary number for a maximum amount of characters.