I have a flow where I am creating a new folder, and then uploading images to that folder.
It is all working well, except for the files are being uploaded as a random file type that can not be openned or read! I have tried uploading .png, .jpeg, .xlsx, .doc, but they all just are uploaded as this generic "file" type that does nothing!
Do I need to format the file a specific way after it is uploaded? Or convert file? Or file properties? I've tried a bunch of things but can not get it to work.
Please help!
This is true. Now I go to try to find out what kind of file it creates. Likely some kind of binary.
It seems to me, that the setting of a file extension does not result in the file content being converted to said content.
So if you place HTML content or Word content, and give it an extension of .pdf, you get a file with .pdf extension, but you do not get a file that is encoded as a PDF, thus when you try to open it, you get an error. Same with the JPG.
In fact, I suspect if you passed it text and told it to save it as a .jpg, then tried opening the created file, it would fail. But if you re-name the file to .txt, and try opening it again, it will open in a text editor with the original text content.
Your flow shows you using Ask In Power Apps to supply the file content. But your run() command in Power Apps is just passing the filename of the file to the flow. If you look at what is actually being passed you will see that it starts with something like 'APPRES:\\'. Files uploaded into an image in Power Apps are actually cached in the browser and the cache is what is displayed. That makes the contents of the file unavailable without extra processing. Take a look at the following walkthrough.
Upload Image to SharePoint list through PowerApps. | MOURI Tech
@CFernandes thanks for the comment. I am still getting the same error though. See pictures:
Any other advice?
Hey Mate,
In the Run() you will need to return the Filename to Power Automate.
The Formula to get the fileName would be
AddMediaButton1.FileName
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Answer to that question is in the screenshots of my last message^
Adding the picture via the "tap or click to add a picture" media add button.
I assume you are uploading the file in Power Apps since you are passing the contents as a parameter. How are you generating the contents to pass to the flow?
This is driving me nuts. Everything appears to be set up correctly; a file is being uploaded; I just can't view the picture when it finally is!! 😫
Yes I have been trying to open it on a regular browser (chrome) on my desktop in Sharepoint. I am attempting to upload the picture via iPhone, and then have it be available to view via Deskstop Sharepoint.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.