I am trying to follow instructions from a site referenced to me about how to upload documents to an SP document library. I have tried eight times to get it to work, without success.
The issue is my inability to get passed the 'Compose' component of the flow creation.
This first image is my flow 'Compose', created EXACTLY as the instruction states. I am unable to see the inputs and outputs as displayed on the instruction 'Compose'. If I click on the download I get the entire file (blob, is it?) contents rather than the four lines shown in the instruction 'Compose'.
This is the 'Compose' from the instructions; where you can clearly see the inputs and outputs language that should appear. I have created the Collection per the instructions, and they have the required and appropriately named fields. Why am I not getting the same inputs and outputs as the example?
I've got the following in the Power Apps button:
Solved! Go to Solution.
Is this JUST for 'image' files? My build must accommodate image, excel, word, and pdf files. I need to be able to upload them and then see/open/link to each one on demand.
Should these be in the Power Apps button or in the Flow?
Only one document (whatever type it is) at a time.
I'm hard coding because that is what the client wants.
They have hundred of people uploading documents. They don't want hundreds of different file names/formats.
Hard coding the field names into the upload language will force the name to be a certain way no matter who is uploaded or what is being uploaded.
The issue I'm running into is viewing 'non-image' documents in a Power Apps Gallery. I can see the image files, I cannot see the other files types. I'm guessing it because of the hardcoding of filename and the addition of the default extension .jpg.
The hardcoding is a deal-breaker; got to have it. Any suggestions on how to correct this problem?
I have this in the button (connected to a flow).
If I use the following I can actually see the pdf file in the library but no thumbnail appears.
Finally made some progress. Now, how do I get the pdf to show, or at least link to it, from the Gallery?
Below is the library. The files are uploading to the proper library and I can see representations of the image and pdf files (Yay!).
This is the what's in the upload button -
This is what's is the Flow -
Glad you managed to get the images/files in. Like I say do consider using the FileName property of the uploaded file, should you start to have issues predicting or working out what the file extension needs to be for each upload.
I would be tempted in a Gallery, just to use the LinktoItem property that should be available for a SharePoint Library. I would also think about coupling it with the Launch function and that way users will have something clickable and for a PDF, it should be fine to render in the browser.
I will try you recommendations.
I've was using the launch function previously, but it wasn't working on the pdf due to the link and the .jpg extention.
Maybe I missed it you your reply, do you have any suggestions about the file naming hardcoding? Is there any way to achieve that with multiple file types? I really need to be able to control how files are named.
Edit - This gets me the pdf to the library, put does not enforce the desired naming convention in the library or show a thumbnail of the pdf.
I'm still struggling with this, even though I thought I had it beat. First image is the library. First item in the library is a newly uploaded pdf file. The condition was able to force the naming convention but I still can't see the thumbnail in the library or a representation of the file in the image control of the Gallery.
Here is the condition, that is successfully posting the document, but with a file extension that makes it viewable. If I put ".jpg" at the end where the quotes are (as I've been doing) I can see all image files but not pdfs.
Any recommendations on how to be able to write this condition so that it allows for viewing image and pdf files?
A generic file flow JSON command gets me the file to the library and recall to a Gallery but does not enforce the naming convention so there is no way to easily filter for the file by UserName, UnqID, etc., as required.
" UpdatedQualificationFlow.Run(JSON(colUpdatedQualificationGallery,IncludeBinaryData)); "
Yes, have mentioned it a couple of times previously but I will forgive you 🙂
Basically if you are using the add picture control, which I think you are in your Power App. There is a filename property. Now using that alone, will at least have the uploaded file name and extension.
So you could leave it as the above, or if you wanted to change the name. You could at least split out the extension from say the FileName property and then just prefix with a manually entered name.
This will then give you a situation where the extension is dynamically reflecting the file type uploaded. The only way this will fall short, is if someone gets clever and renames to an incorrect extension prior to uploading but in that case just fire them lol:)lol
How magnanimous of you.👍
So much back and forth that I couldn't find my way through; though I new there was something in there to find, an answer.
Now, to make sure I do this right can you please clarify:
"Basically if you are using the add picture control" - I am using an attachment control in a Gallery or Form (depending) to upload the files, and an 'Image' control in a Gallery to display the files from the library. There is no 'Add Picture' control being use anywhere. How does this change you recommendation?
AddMediaButton1.FileName - Will this still work in an attachment control? If yes, where exactly, are you recommending I place this; and what am I overwriting with it?
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.