The way you upload has changed due to changes in flow. Power Apps Upload File v2 to SharePoint Document Library ua-cam.com/video/cjcDH7_v6cE/v-deo.html
I will tell you what, I wanted to save time to achieve this functionality, First thought: Shane video: too long.. nah!! watched whole lot of other videos in UA-cam. Try to implement in easy way, spent a whole day. And then I realized, Shane is the community expert lets go back and watch his video. 40 mins to implement. Boom!! Working now. I should have done this first. Kudos to you Shane. !! Man of the year !! No other words to say
@14:46 made me lol. Shane, thanks again... Learning lots man. Watched this one about 3 times in it's entirety in sections over 2 days. Rebuilt the whole thing to learn along w/you. Going to watch the next one so I can send metadata (columns in SP) along with the file. I don't fully get why we need to keep the image control however if the file is not an image and we don't need to visually validate it. I guess I will watch again haha. Nice work brother!
Be sure to checkout the curated content library and subscribe to download this app and formulas and a whole lot more. training.powerapps911.com Check out multi-file upload including drag and drop now available here: ua-cam.com/video/7UeRzfPo8RE/v-deo.html
Hi Shane, Thanks for all the useful videos. Can you please help me in getting little help for my requirement. I need to upload an excel file from user's local machine to one drive from power apps. I know this can be done through cloud flow, but can you please help me for the flow steps. And after uploading the excel file, i want to read the content of excel and return it back to the power apps. can you please give some pointers here.
I know Im asking the wrong place but does someone know of a tool to log back into an instagram account?? I was stupid forgot the login password. I would love any tricks you can give me!
We've been using a SPO List to attach a file and then move it to a DocLib with meta data. This will reduce overhead and should increase reliability by making the upload direct (Thank you x M). General Note: If I was a hardcore Apple guy [dry-heave] and refused to do anything Microsoft, I would still watch your videos for the entertainment value alone. You, my friend, are the Gene Simmons of Power Apps!! Thank you for what you are doing!
Hi Shane. I just want to let you know that this video reached a guy many miles away and helped him and his team to reach impressive objectives. I was looking for this for so long that I almost gave up. Cheers from Brazil.
A great teacher with great content..I struggled a bit after creating the Instant flow..sharing one learning/observation to save others that time and effort..when following the video make sure the variables ( the one we are picking as "Ask in PowerApps" - do not repeat that step as it creates duplicate variable/memory and equivalent number of arguments would be asked in powerapps then resulting the flow to be failed. I had to create new one to overcome that..Cheers..
Such a helpful video!! I was stuck on trying to upload a file to a REST API for so long and finally succeeded in doing so using this video! Thank you so much!
Most of the Power App solutions I'm wanting to build require uploads to a SharePoint document library, so this tutorial is the missing link I've been searching for. I am ecstatic!! 🥳 Thanks Shane
This is super cool Shane! Thanks for sharing! Would really like to see how you return files into a Gallery Control from a document library... Great job!
Shane Young Have been a huge fan since the days you and Todd did your talks at The SharePoint conferences way back. I was wondering if you have work out how to return files into a Gallery Control from a document library? Would love to see a video on how! Keep up the great work!
Hi Shane... First, I would like to thank you because your videos have been my primary source of learning, regarding PowerApps, over the past year or so... Second, I'd like to offer up my own twist on this amazing way to upload files. You actually can upload multiple files at a time. You just have to tell the attachment control to "Collect" the name and value each time a file is added, or remove the file from the collection whenever a file is removed from the attachment control. When you are ready to do the uploading, you need to use a timer... I use a duration of 10 seconds because I've noticed it takes about 4 seconds for the flow to add the attachment to the document library... It really doesn't matter how long the timer duration is, though, because you can set a flag for the arrival of the thumbnail that Flow returns to PowerApps after it finishes adding the file to your doc library.... If the file hasn't been returned at the timer end, you take no action... .If it has, you add the thumbnail to a verification collection, remove the first item from the collection you created when you added files to the attachment control, and re-run the flow call from PowerApps over and over again until CountRows of the collection is zero..... I was super excited when I figured this out.... Again, thanks for your dedication and commitment to teaching. What you are doing is extremely valuable because when a business needs to solution to a particular problem and can't wait 5 years or budget $15MM for an enterprise solutions, the PowerApps/Flow/SharePoint standard tools offer mere mortals a way of solving extremely urgent business problems....
Thank you so much for this. I have followed your entire process step by step and am getting an error with the Set(VarFileLink... part. Although my code matches your exactly, I'm getting an invalid number of arguments: received 2, expected 1. Do you have any quick thoughts on why this might be happening? Thanks again
I found the solution...When you're doing the section in the Flow for "File Content", make sure you're using Createfile_FileContent instead of Createfile_FileName.
Thanks Shane. This is the second time I have watched this. The first time I got all turned around and couldn't get it to work. Just went through it again and it works like a dream. This is exactly what I need for a file uploading app. Thank you for all your great videos.
Hi Shane. Love your videos brother. Love your passion. Keep sharing the love. Some viewers might have last update of PA where 'Run' needs 3 arguments, hence the lines would look like this : Set(VarLast, Last(AttachmentControl.Attachments).Name); Set(VarFileLink, UploadAttachmentCD_Award.Run(VarLast, VarBase64Only, VarBase64Only).sharepointfilelink) Let me know what you think or if you have a prettier solution? Peace
could this explain why suddenly my upload file function isn't working anymore ? I've used this method for a few months now and all of a sudden my flows ''succeed'' but my pdf files are corrupt on sharepoint.
Another excellent video! Thank you for sharing! I started learning PowerApps just a few weeks ago but can create apps for work now, using your videos. You save me so much work. Thanks again.
Fantastic video Shane, as always. For some reason, it took me two tries through it to get it to work. But I am proud to say that I was able to integrate it with another "append comments" video of yours. My project required that the gallery item's edit form have the ability to add text AND screenshots / images. So I consolidated this solution into the append comments and changed the code of my Save button. I added an If statement of "If(varFileLink = Blank()" then added the code for appending text if true and appending a link to the image file if false. It worked like a charm!! Thanks again for all your great content. I use your curated library a ton as well. 🙂
Hero of the day and yes, bless you :) (what a sneeze...) This topic is very popular on internet but you first explain in detail whats going on... Great Job and thanks.
Ohh Shane! That's so marvelous! I had re-viewed this vid a few times but got it to work with the PDF - Function to generate a PDF File in the PDF viewer (I think you made a video about that), and passing this through the image control gave me the 7:33 reaction! Woohoo! No more complex calculations within PDF forms but simple calculations in the app! Much easier to maintain! And our business people hate filling out PDF forms! Now while patch adds data directly into Sharepoint, just for the PDF file I still need a flow. If there were a way to Patch this data without a flow into sharepoint ... there is this Forms attachment.update thingy ... I need to investigate ... Thank you so much for the many inspiring videos :)
I know this is a slightly older video but it helped out a lot! Around the 25:50 mark, you mentioned having to click the attachment control multiple times sometimes, this is likely because only the "Attach file" part of that control is clickable.
Great video as always. Thanks for that. With the PowerApp connector V2, you can now save yourself some effort and also have the advantage of being able to upload several files in one go. I use the attachment control from a form as described by Shane, but no longer have to limit it to one file. Then I use a "ForAll" over all its attachments and pass the data of each file in turn to a flow. In the flow, I use the data type "File". This then expects a record with "name" and "contentBytes" from the PowerApp. I fill "name" with "Name" from the attachment control and "contentBytes" with the "Value" of the attachment control. Nothing has to be converted for the value, no matter whether JPG, GIF, PDF, DOCX, XLSX or anything else is passed, the flow takes everything and makes the correct file in SharePoint out of it. Because I did not succeed in using "name" from the record as the name for "Create File in SharePoint", I also pass a string with the file name to the flow, again "name" from the attachment control.
Fantastic. Exactly what we needed to get us going. One issue I initially have is when adding multiple files (form file explorer, ctrl or Shift click), PNG files do not get uploaded, they need to be uploaded manually. Next step is to add the ability tag with metadata for uploads, then have a combo of power apps/Automate fill the metadata. Probably need to add an item or file update step after adding the file in the Power automate.
Sir Shane!, This is what I needed so long ago, I searched and searched and it was so "simple." Now, we need the PDF preview to be incorporated into the gallery to close the cycle. Really thanks!!!!
From about 6:56 - 7:15, there's a step that I can't get to work properly. You are able to create a button with an OnSelect formula that begins with Set(varDemoFromAttachmentControl ....) and then you create a label where text = varDemoFromAttachmentControl and that generates the "appres://blobmanager ..." in quotes. When I create that label and create the formula, nothing happens. I don't see the "appres://blobmanager ..." in quotes like you do in the video. Any idea what I could be missing? I've tried over and over and over.
I tried it again after posting the above comment and not it works! Can't explain it. But who cares. Hey, thanks for all your videos; you do a great job.
Fantastic. I will for sure use this in a customer project where they have 8 different SP libraries and I can create an app that "magically" finds the correct one (based on AD properties) and uploads it (with a bunch of column values as well)
Hi Shane, my flow returns this error: Unable to process template language expressions in action 'Create_file' inputs at line '0' and column '0': 'The template language function 'base64ToBinary' was invoked with a parameter that is not valid. The value cannot be decoded from base64 representation.'. Any suggestion on what might be happening?
Hi Shane, great vid as always, BUT, at around 22:30, is when you start deleting all the other controls on your screen. Do you delete the Image control Image1? it seems to disappear, but when i delete it everything stops working.
Hi Shane, i have a question, what is the function of "varFilelink" as you add and noticed at 20:41 ? im really happy cause on this channel so many knwoledge i've got.
Shane, the Attachment control has a limit of attachments and by default it is set to 6. I believe this Attachment control must be reset, otherwise you hit the limit and your app will stop working (making that limit much higher is not feasible IMO). I am using Reset(AttachmentControl) in "Upload to Sharepoint" button OnSelect formula. This control is outside of the form where it belongs to by design, so this Reset function is the only solution that I could find. And I have some comments on those string manipulations and encoding in the Flow, but this is not for UA-cam comments.
HI Shane, love your videos. Have a question. It seems the 'AttachmentControl' that you spoke off no longer exists on the web (You mention it at 5:28). Is there a workaround for this?
Hi Shane, really cool video! I've been looking for this for a while. When I get to 8:21 on the video, and map the button to Image1.Image my PowerApp freezes and crashes. I have no idea why this is the case. Is it because of the file? Thanks
Great video, been trying to make it work seamlessly for a while now. Shane did you find a way how to make the whole area of the attachment control clickable? The way you did it, only the part where the "attach file" text would be is actually active to be clicked which can be frustrating to the user as for them it appears like the whole thing should be working... I believe it's the same thing that caused your button not to fire the first time you clicked it in the preview mode.
just awesome! thank you! I tried it out not using attachments, but Add Media With Image (and into a collection) and also into 2 separate buttons... it worked perfectly!!!... I am building an offline app and need to upload several photos from inventory reviews... now i need to figure out how to give the file a name related to the location scouted and how mass upload the base64 :P... kinda feel smarter tonight thanks to you!
Hello Shane, here you are getting only the last element added to the AttachmentControl. Would it be possible to get all the files in it with a forall loop? If it's possible it would be very kind of you to show me an exemple? If I remember correctly, I read somewhere that it was impossible to loop through an attachmentcontrol with a forall. Do you have a suggestion? Thanks!
Hello Shane, Can I ask you, if I want to change a previously created file in powerapps, should I use the edit rich text controller or there are another way to edit? Because I need to create files(word or pdf), also to edit them in powerapps( I use sharepoint). Thank you in advance!
Thanks for sharing this with us! Have you had any issues using this app on ios? for some reason it works perfectly on preview and android but everyone with a iphone that tries it gets this error on the create file step of the flow. "Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '12587': 'The template language function 'base64ToBinary' was invoked with a parameter that is not valid. The value cannot be decoded from base64 representation.'."
Shane: Thank you, thank you, thank you. I do have one question. How do I make sure that the file doesn't overwrite a file that's already in there with the same name? If I'm actually in the library uploading something, it will give me a choice of overwriting a file or canceling.
@@ShanesCows Thank you! I'll take a look at it. I have written the flow to send back the FileID so that I can then navigate to the edit form of the document properties so that I can add metadata. Then after it's updated, I have another flow that allows me to check the file in. I'm very excited about this. The first part of the app, I have a combobox to choose the library, and so the two flows use that info in a switch so that I can use the same flow for any library. It's perfect. Thank you so much for showing me this.
@@ShanesCows Thanks for the video, using that helped me give the same kind of message in Power Apps. I use it to upload the file to the correct library, and then I can add metadata using a form for that library. Perfect way of adding metadata! And, I even added a check in button! I'm pretty stoked. You are amazing! 🏆🏆
Just a question. I am having an error after file has been created in the SharePoint. Error when trying to open the file: This workbook couldn't be opened because the file format may not be matching with the file extension. I used a different approach because I use the PowerAppsV2 trigger. The reason is I need other variables aside from the file name and file content coming from PowerApps. After extracting the file content based 64 code, I converted it into a string variable then put the variable inside based64tobinary in PowerAutomate once the flow has been triggered. Not sure what is causing the file to be corrupted.
I am not sure either. I would start over with a simpler flow, see if you can get the upload to work. Then add the other pieces. This video would let you use the v1 trigger and set the other fields also ua-cam.com/video/e0kMjb686tc/v-deo.html
Hi Shane, I am following your video to the 'T' and keep hitting a bump at 'EasyUpload.Run( ---> there are 4 arguments expected, not 2 as in your video; yours is asking for (CreateFile_Name, CreateFile_Content) ; for some reason (User error??!), I am expected to enter (CreateFolderPath, CreateFileName, CreateFileName1, CreateFileContent) ; I don't understand where the additional arguments for CreateFolderPath and CreateFileName1 are coming from - my flow is mirroring yours. I suspect this has something to do with the Sharepoint site but tried different paths and folders and cannot get this to work. Do you have any suggestion for what else I need to check? Thank you!!!
Thank you so much Shane for this amazing video. I just have an issue that I can't resolve. When I am trying to I click on "Button" after applying the varDemoAttachmentControl as you explained at 7:08, the "Label" box is empty and I can't see anything inside. What am I missing here?
Great video! Works great! One question I’m not sure if there’s already a video for it but is there a way that the file can stay in my power app as well so my users can open the file straight from the app?
Thanks this is great! Instead of the Attachments control I was able to get this working with the Add Picture control (so I can use iPad camera). It works when i upload a test image on desktop, but app freezes when I try to perform the same task with an photo I took with the iPad camera.
I've been having the exact same issue! though, with the attachment control, and on iPhone - first image will work, all else in that same browsing session fail. From what I understand, it seems that the 'appres://' + blobmanager don't play well with iPhone images. Its most frustrating, because I can't get at either of those to debug - they are obfuscated away from powerapps. If anyone has found a workaround, I would love.
First of all Big fan!!! You've teach me a lot Some how I am doing the same.... everything was great!!! but in the formula from minute ~19:57, I got an error (Invalid number of arguments: received 2, expected 1) but i can't get to why Please Help!!
hello Shane, great work as always, is there anyway to do this but with several files? not just one, with a forall function or something like that? Again thanks
Hi shane, I got the error message at : ".......EasyUpload.Run(Last(Upload.Attachments).Name; varBase64Only)" -> The error is: Invalid number of arguments: received 2 expected 3. Do you know what I am missing? Thank you very much in advance!
Hi Shane. For the instruction at minute 20, I'm getting an Invalid Arguments error for the "Set(varFileLink ...) command. Can you spot the error in the expression below? (I've set up the Flow and tested it successfully. The flow is called "UploadtoCDTSIOISharePointSite" Set(varFileLink, UploadtoCDTSIOISharePointSite.Run(Last(AttachmentControl.Attachments).Name, varBase64Only).sharepointfilelink)
This looks good Shane. Do you have any suggestions if I wanted to associate a document content type with meta data to a given document being pushed to SP?
Hi Shane, everything is working with the exception of the file that is uploaded to SharePoint. It is an appres___blobmanager.... file, same name as you get with image1.Image. I have checked my code for the varBase64only variable against your video at 12:40 minutes. It all looks good. The only thing at 12:40 minutes that suddenly changes is the disappearance of the JSONFormat wrapper. (Tried both with and without JSONFormat wrapper which the PA editor seems to remove for you.) But I have it in my code as: Set(var1,JSON(image1.Image,JSONFormat.IncludeBinaryData)); Set(varBase64Only,Mid(var1,Find(",",var1)+1,Len(var1)-Find(",",var1)-1));Set(varSPfilelink,'ScheduledRefresh-Test1'.Run(Last(attachment_control.Attachments).Value,varBase64Only).spfilelink); Can you tell me if you see an error? Obviously everything else is working, otherwise I wouldn't be getting a file uploaded to SP. I still have my labels that show the var1 output (varDemo.... in your video) and varBase64only output. I test on Excel, and the correct base64only portion is being returned with the prefix stuff and last double quote all stripped out. Also double checked Create File in work flow - the base64ToBinary() formula looks correct. This is such an invaluable method - very awesome, thanks! Any help would be greatly appreciated.
All I can guess is you are sending the wrong parameters to flow somehow. I use this method daily and it works. The fact you are using Last(....).Value tells me you are sending the appres to flow
@@ShanesCows , you are right on! Thank you for saving me from my own stupidity. : ) I had .Value instead of .Name. Now the code to run the flow looks like: Set( varSPfilelink, 'ScheduledRefresh-Test1'.Run( Last(attachment_control.Attachments).Name, varBase64Only ).spfilelink ); .... and I am rejoicing that it works!! Thanks so much Shane, you don't know how valuable your help has been. I sure appreciate the quick reply. Hours saved!
Shane nice video but on the create file , the file name and content on dynamic content are empty how can assist on that
The way you upload has changed due to changes in flow.
Power Apps Upload File v2 to SharePoint Document Library
ua-cam.com/video/cjcDH7_v6cE/v-deo.html
Thank you Shane then how do I display that uploaded file to gallery
@@ntethelelobuthelezi8925 ua-cam.com/video/u-b8w9ea1kk/v-deo.html
Shane can you show me something like upload a file using attachment component and display that file in a gallery it doesnt have to go to sharepoint
I will tell you what, I wanted to save time to achieve this functionality, First thought: Shane video: too long.. nah!! watched whole lot of other videos in UA-cam. Try to implement in easy way, spent a whole day. And then I realized, Shane is the community expert lets go back and watch his video. 40 mins to implement. Boom!! Working now. I should have done this first. Kudos to you Shane. !! Man of the year !! No other words to say
Thanks. Sometimes videos are long but they are always long because that is how long it takes to teach the topic. Never because I ramble. :)
@14:46 made me lol. Shane, thanks again... Learning lots man. Watched this one about 3 times in it's entirety in sections over 2 days. Rebuilt the whole thing to learn along w/you. Going to watch the next one so I can send metadata (columns in SP) along with the file.
I don't fully get why we need to keep the image control however if the file is not an image and we don't need to visually validate it. I guess I will watch again haha. Nice work brother!
Congrats, Shane, on cracking this nut after 1-1/2 years. This is a critical business need. Looking forward to putting it in use.
Thanks Jim.
Be sure to checkout the curated content library and subscribe to download this app and formulas and a whole lot more. training.powerapps911.com
Check out multi-file upload including drag and drop now available here: ua-cam.com/video/7UeRzfPo8RE/v-deo.html
Hi Shane, Thanks for all the useful videos. Can you please help me in getting little help for my requirement. I need to upload an excel file from user's local machine to one drive from power apps. I know this can be done through cloud flow, but can you please help me for the flow steps. And after uploading the excel file, i want to read the content of excel and return it back to the power apps. can you please give some pointers here.
I know Im asking the wrong place but does someone know of a tool to log back into an instagram account??
I was stupid forgot the login password. I would love any tricks you can give me!
We've been using a SPO List to attach a file and then move it to a DocLib with meta data. This will reduce overhead and should increase reliability by making the upload direct (Thank you x M). General Note: If I was a hardcore Apple guy [dry-heave] and refused to do anything Microsoft, I would still watch your videos for the entertainment value alone. You, my friend, are the Gene Simmons of Power Apps!! Thank you for what you are doing!
Rob you are too kind. Happy holidays to you and your wonderful family if I don’t talk to you soon. 😍
NEW! Dec 2023 version of this video for single or multiple uploads.
ua-cam.com/video/cjcDH7_v6cE/v-deo.html
Hi Shane. I just want to let you know that this video reached a guy many miles away and helped him and his team to reach impressive objectives. I was looking for this for so long that I almost gave up. Cheers from Brazil.
That is awesome 🐶
A great teacher with great content..I struggled a bit after creating the Instant flow..sharing one learning/observation to save others that time and effort..when following the video make sure the variables ( the one we are picking as "Ask in PowerApps" - do not repeat that step as it creates duplicate variable/memory and equivalent number of arguments would be asked in powerapps then resulting the flow to be failed. I had to create new one to overcome that..Cheers..
Such a helpful video!! I was stuck on trying to upload a file to a REST API for so long and finally succeeded in doing so using this video! Thank you so much!
That is awesome Sarah. Good job. 🙌
Shane I love your work man, you've saved me countless hours trying to figure out all of this stuff. These videos are a life saver. Cheers mate!
Glad to help. 😀
Most of the Power App solutions I'm wanting to build require uploads to a SharePoint document library, so this tutorial is the missing link I've been searching for. I am ecstatic!! 🥳 Thanks Shane
Hey Wendy, there is a newer version of this video, they changed some stuff ua-cam.com/video/cjcDH7_v6cE/v-deo.html
Thank you for the link, Shane. I'll give it a watch
This is super cool Shane! Thanks for sharing! Would really like to see how you return files into a Gallery Control from a document library... Great job!
I like this idea also.
Shane Young Have been a huge fan since the days you and Todd did your talks at The SharePoint conferences way back. I was wondering if you have work out how to return files into a Gallery Control from a document library? Would love to see a video on how! Keep up the great work!
Hi Shane... First, I would like to thank you because your videos have been my primary source of learning, regarding PowerApps, over the past year or so...
Second, I'd like to offer up my own twist on this amazing way to upload files.
You actually can upload multiple files at a time. You just have to tell the attachment control to "Collect" the name and value each time a file is added, or remove the file from the collection whenever a file is removed from the attachment control.
When you are ready to do the uploading, you need to use a timer... I use a duration of 10 seconds because I've noticed it takes about 4 seconds for the flow to add the attachment to the document library... It really doesn't matter how long the timer duration is, though, because you can set a flag for the arrival of the thumbnail that Flow returns to PowerApps after it finishes adding the file to your doc library.... If the file hasn't been returned at the timer end, you take no action... .If it has, you add the thumbnail to a verification collection, remove the first item from the collection you created when you added files to the attachment control, and re-run the flow call from PowerApps over and over again until CountRows of the collection is zero..... I was super excited when I figured this out....
Again, thanks for your dedication and commitment to teaching. What you are doing is extremely valuable because when a business needs to solution to a particular problem and can't wait 5 years or budget $15MM for an enterprise solutions, the PowerApps/Flow/SharePoint standard tools offer mere mortals a way of solving extremely urgent business problems....
Awesome. Thanks for sharing 😀
Thank you, Shane! This is again a great video with impressive content.
Thank you
Love to hear “After a year and a half” making it easy for us. Thank you!
Making this video was hard but worth the effort. 🤩
Thank you so much for this. I have followed your entire process step by step and am getting an error with the Set(VarFileLink... part.
Although my code matches your exactly, I'm getting an invalid number of arguments: received 2, expected 1.
Do you have any quick thoughts on why this might be happening?
Thanks again
I am having the same issue did you find a solution?
I'm getting this same error. Did you ever find a solution?
I found the solution...When you're doing the section in the Flow for "File Content", make sure you're using Createfile_FileContent instead of Createfile_FileName.
@@andielandino5957 Thank you!!!! I've been trying to fix this issue for a bit too long now.
Shane, its 2021 and you still the man! (Its over a year and your stuff is still relevant!)
Thanks 😊 Wait till you find the 4 year old videos that still work also. Love the long shelf life.
Thank you so much Shane! Finally... I can use attachments!!!
Glad it helped Barry
Thanks Shane. This is the second time I have watched this. The first time I got all turned around and couldn't get it to work. Just went through it again and it works like a dream. This is exactly what I need for a file uploading app. Thank you for all your great videos.
Great to hear!
Shane!!! second time you save my neck, again, love you man!
That is awesome Jean!
As someone just starting out in a new role which involves a lot of PowerApps this was a fantastic help. Thanks for the great videos.
Very welcome!
Good Job !, implemented in my new project and working like a champ ! thank you
Glad to help. 😀
Shane, this was exactly what I needed and explained it perfectly. You are a Legend!
Hi Shane. Love your videos brother. Love your passion. Keep sharing the love.
Some viewers might have last update of PA where 'Run' needs 3 arguments, hence the lines would look like this :
Set(VarLast, Last(AttachmentControl.Attachments).Name);
Set(VarFileLink, UploadAttachmentCD_Award.Run(VarLast, VarBase64Only, VarBase64Only).sharepointfilelink)
Let me know what you think or if you have a prettier solution?
Peace
Thanks for sharing. 😍
could this explain why suddenly my upload file function isn't working anymore ? I've used this method for a few months now and all of a sudden my flows ''succeed'' but my pdf files are corrupt on sharepoint.
Another excellent video! Thank you for sharing! I started learning PowerApps just a few weeks ago but can create apps for work now, using your videos. You save me so much work. Thanks again.
Awesome 😎
Fantastic video Shane, as always. For some reason, it took me two tries through it to get it to work. But I am proud to say that I was able to integrate it with another "append comments" video of yours. My project required that the gallery item's edit form have the ability to add text AND screenshots / images. So I consolidated this solution into the append comments and changed the code of my Save button. I added an If statement of "If(varFileLink = Blank()" then added the code for appending text if true and appending a link to the image file if false. It worked like a charm!! Thanks again for all your great content. I use your curated library a ton as well. 🙂
Good job Tena. And thanks for sharing what you did. It helps others. :)
Shane my man got every tutorial for PowerApps i need.
Glad to help!
Excellent video, keep up the good work for the power platform community. Wouldn't have built out our LOB app without your videos and mentoring.
Thanks Mark. You ain’t bad at Power Apps yourself. 😻
Shane, you're an absolute legend mate!!! Worked like a charm. The amount of people you keep in their jobs 🤣🤣🤣🤣
Glad to help. The more people building the better for all of us.
Hero of the day and yes, bless you :) (what a sneeze...) This topic is very popular on internet but you first explain in detail whats going on... Great Job and thanks.
Glad to help. 😀
Thanks so much Shane. You saved my mind. Been trying to do this for a super long time. You are my goto guy from now on.
Glad to help. 😀
Hi Shane, You make everything in Power Apps simpler. Lots of love from India 🇮🇳 for Chewy 👍🏻
🐶 Chewy says thank you. 🐶
Love this! Got it working exactly the way I need. Now onto the next step, Multi-File upload implementing these principles.
Fantastic!
Ohh Shane! That's so marvelous! I had re-viewed this vid a few times but got it to work with the PDF - Function to generate a PDF File in the PDF viewer (I think you made a video about that), and passing this through the image control gave me the 7:33 reaction! Woohoo! No more complex calculations within PDF forms but simple calculations in the app! Much easier to maintain! And our business people hate filling out PDF forms!
Now while patch adds data directly into Sharepoint, just for the PDF file I still need a flow. If there were a way to Patch this data without a flow into sharepoint ... there is this Forms attachment.update thingy ... I need to investigate ...
Thank you so much for the many inspiring videos :)
Awesome Mike! Glad to help. 😀
I know this is a slightly older video but it helped out a lot! Around the 25:50 mark, you mentioned having to click the attachment control multiple times sometimes, this is likely because only the "Attach file" part of that control is clickable.
You nailed it Jon. 😎 I got better at this one over time. Thanks
YOUUU ARE THE BEEEST!!! HUG FROM BRAZIL!!
There is a newer version. 😎 Power Apps Upload File v2 to SharePoint Document Library
ua-cam.com/video/cjcDH7_v6cE/v-deo.html
Great video as always. Thanks for that.
With the PowerApp connector V2, you can now save yourself some effort and also have the advantage of being able to upload several files in one go.
I use the attachment control from a form as described by Shane, but no longer have to limit it to one file. Then I use a "ForAll" over all its attachments and pass the data of each file in turn to a flow.
In the flow, I use the data type "File". This then expects a record with "name" and "contentBytes" from the PowerApp. I fill "name" with "Name" from the attachment control and "contentBytes" with the "Value" of the attachment control. Nothing has to be converted for the value, no matter whether JPG, GIF, PDF, DOCX, XLSX or anything else is passed, the flow takes everything and makes the correct file in SharePoint out of it. Because I did not succeed in using "name" from the record as the name for "Create File in SharePoint", I also pass a string with the file name to the flow, again "name" from the attachment control.
Awesome Andreas! I think in 2023, at some point, I will remake this video showing the v2 way. 🥳
Fantastic. Exactly what we needed to get us going. One issue I initially have is when adding multiple files (form file explorer, ctrl or Shift click), PNG files do not get uploaded, they need to be uploaded manually.
Next step is to add the ability tag with metadata for uploads, then have a combo of power apps/Automate fill the metadata. Probably need to add an item or file update step after adding the file in the Power automate.
Here is a video on Multi-upload ua-cam.com/video/7UeRzfPo8RE/v-deo.html
Here is a video on Setting Metadata ua-cam.com/video/e0kMjb686tc/v-deo.html
Love you work Shane, you're so passionate with it. A great guru.
Thanks! 🤩
Sir Shane!,
This is what I needed so long ago, I searched and searched and it was so "simple."
Now, we need the PDF preview to be incorporated into the gallery to close the cycle.
Really thanks!!!!
I usually just Launch the pdf url.
Saved me, hours of time in fixing file upload issue using powerapps v2 connector. Thanks!
Glad it helped
From about 6:56 - 7:15, there's a step that I can't get to work properly. You are able to create a button with an OnSelect formula that begins with Set(varDemoFromAttachmentControl ....) and then you create a label where text = varDemoFromAttachmentControl and that generates the "appres://blobmanager ..." in quotes. When I create that label and create the formula, nothing happens. I don't see the "appres://blobmanager ..." in quotes like you do in the video. Any idea what I could be missing? I've tried over and over and over.
I tried it again after posting the above comment and not it works! Can't explain it. But who cares. Hey, thanks for all your videos; you do a great job.
Glad you got it. 😀
Fantastic. I will for sure use this in a customer project where they have 8 different SP libraries and I can create an app that "magically" finds the correct one (based on AD properties) and uploads it (with a bunch of column values as well)
Nice!
Baby I love you finally i felt like i would never be able to solve meastery of blob thingy but you are the king like,subscribe and comment
There is an updated version here :) ua-cam.com/video/cjcDH7_v6cE/v-deo.html
And don't tell anyone but next Monday's video will be Advanced Uploads. 😉
I know I'm late to the party, but THANK YOU! This was exactly what I needed. Liked and Subscribed!
Thanks for the sub! Happy New Year!
7:32 MIND=BLOWN .. You are amazing Shane! Thanks for your videos. I used this trick to upload files into a Gis Cloud storage.
Awesome
Hi Shane, my flow returns this error: Unable to process template language expressions in action 'Create_file' inputs at line '0' and column '0': 'The template language function 'base64ToBinary' was invoked with a parameter that is not valid. The value cannot be decoded from base64 representation.'. Any suggestion on what might be happening?
I would check what you are passing from Power apps. Sounds like you didn't send it base64 only.
Hi Shane, great vid as always, BUT, at around 22:30, is when you start deleting all the other controls on your screen. Do you delete the Image control Image1? it seems to disappear, but when i delete it everything stops working.
Nope. Image control has to stay. I set the visible property to false so they can't see it to avoid confusing the user but it is still there.
This is amazing. Will be definitely be using this! You never disappoint, great video.
Awesome! Thank you!
Many Thanks Shane, Learning is so much fun with your videos!
My pleasure!
Great Job, Shane!! I've been looking for this for so long. Thank you so much!
Happy to help!
Thanks!
No problem! Happy to help. Have a great day. 🐶
14:50 Bless You 🙂
Thanks 🤩
Wow !! Thank you !
and Double "Bless you" - the 1st for the sneeze and the 2nd for this video. 😜
Thanks Rachel
Shane, You are the best man. You just solve my issue! Thank you
Glad to help.
This helped me a lot! Thanks, your videos are the best as always.
Happy to help!
Hi Shane, i have a question, what is the function of "varFilelink" as you add and noticed at 20:41 ? im really happy cause on this channel so many knwoledge i've got.
So I could respond from the flow with the link to the newly created file. Not critical.
Thank you thank you thank you. You have no idea how grateful I am for this.
Glad to help. 😀
Shane, you are the man for this one!
Thank you! It took a long time to work it all out.
Love you reaction when getting base64 info.
Thank you for all this great videos!
Shane, the Attachment control has a limit of attachments and by default it is set to 6. I believe this Attachment control must be reset, otherwise you hit the limit and your app will stop working (making that limit much higher is not feasible IMO). I am using Reset(AttachmentControl) in "Upload to Sharepoint" button OnSelect formula. This control is outside of the form where it belongs to by design, so this Reset function is the only solution that I could find. And I have some comments on those string manipulations and encoding in the Flow, but this is not for UA-cam comments.
Leon I always reset the control after every upload also
Really nice technical video which clear idea of power app with file upload with out of the box control. thanks Shane
Glad to help. 😀
HI Shane, love your videos. Have a question. It seems the 'AttachmentControl' that you spoke off no longer exists on the web (You mention it at 5:28). Is there a workaround for this?
Sorry nevermind I figured it out
Just so others know. You have to add a SharePoint list in a form and steal the control. 😀
That was impressive! Thank you for sharing your knowledge and for giving credit where it's due.
Glad it was helpful!
My powerapp crashes, once I press button in 07:32, what should i do?
Not sure. Try a different browser?
Hi Shane, really cool video! I've been looking for this for a while. When I get to 8:21 on the video, and map the button to Image1.Image my PowerApp freezes and crashes. I have no idea why this is the case. Is it because of the file?
Thanks
i'd like to say something to past Shane: you're awesome.
Right back at you! 🐶 Thanks
Hey Shane, this is great! Thank you very much for this video.
Glad it was helpful!
Great video, been trying to make it work seamlessly for a while now.
Shane did you find a way how to make the whole area of the attachment control clickable? The way you did it, only the part where the "attach file" text would be is actually active to be clicked which can be frustrating to the user as for them it appears like the whole thing should be working... I believe it's the same thing that caused your button not to fire the first time you clicked it in the preview mode.
I haven't. When I have used this for client apps I have just made everything very small so there wasn't a lot of space to miss click. 😑
Man, you keep saving my day over and over again. Thank you.
just awesome! thank you! I tried it out not using attachments, but Add Media With Image (and into a collection) and also into 2 separate buttons... it worked perfectly!!!... I am building an offline app and need to upload several photos from inventory reviews... now i need to figure out how to give the file a name related to the location scouted and how mass upload the base64 :P... kinda feel smarter tonight thanks to you!
Nice work!
THANK YOU! Displaying an image in base64 helped me solve a problem that had me completely stumped.
Awesome!
Hello Shane, here you are getting only the last element added to the AttachmentControl. Would it be possible to get all the files in it with a forall loop? If it's possible it would be very kind of you to show me an exemple? If I remember correctly, I read somewhere that it was impossible to loop through an attachmentcontrol with a forall. Do you have a suggestion? Thanks!
Power Apps Upload Multiple Files AND Drag and Drop Files
ua-cam.com/video/7UeRzfPo8RE/v-deo.html
😎
Very helpful! Thanks Shane and like all the dog images in your videos
Dear Shane,
You are the best, thank you so much from Kazakhstan)))
Glad to help. 😀
Hello Shane,
Can I ask you, if I want to change a previously created file in powerapps, should I use the edit rich text controller or there are another way to edit? Because I need to create files(word or pdf), also to edit them in powerapps( I use sharepoint). Thank you in advance!
Absolutely fantastic - easy to follow and extremely well explained! Thank you so much Shane! :)
You're very welcome!
Thanks for sharing this with us! Have you had any issues using this app on ios? for some reason it works perfectly on preview and android but everyone with a iphone that tries it gets this error on the create file step of the flow.
"Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '12587': 'The template language function 'base64ToBinary' was invoked with a parameter that is not valid. The value cannot be decoded from base64 representation.'."
I have not. All of my testing is usually on an iPhone. That is odd.
Shane: Thank you, thank you, thank you. I do have one question. How do I make sure that the file doesn't overwrite a file that's already in there with the same name? If I'm actually in the library uploading something, it will give me a choice of overwriting a file or canceling.
You would have to build you own logic for checking if there is a conflict. This video will give you some ideas ua-cam.com/video/Ap3_Ea9H8b0/v-deo.html
@@ShanesCows Thank you! I'll take a look at it. I have written the flow to send back the FileID so that I can then navigate to the edit form of the document properties so that I can add metadata. Then after it's updated, I have another flow that allows me to check the file in. I'm very excited about this. The first part of the app, I have a combobox to choose the library, and so the two flows use that info in a switch so that I can use the same flow for any library. It's perfect. Thank you so much for showing me this.
@@ShanesCows Thanks for the video, using that helped me give the same kind of message in Power Apps. I use it to upload the file to the correct library, and then I can add metadata using a form for that library. Perfect way of adding metadata! And, I even added a check in button! I'm pretty stoked. You are amazing! 🏆🏆
Fantastic Shane, as usual, I dare say I will be using this at some point. Next guide "How to upload attachment to SharePoint List" :p
I will see what I can do
You my man you are the king !!! Awesome video
Thanks 😍
Excellent and well explained, thank you so much for making simplifying our work !!
Glad to help. 😀
Just a question. I am having an error after file has been created in the SharePoint.
Error when trying to open the file:
This workbook couldn't be opened because the file format may not be matching with the file extension.
I used a different approach because I use the PowerAppsV2 trigger. The reason is I need other variables aside from the file name and file content coming from PowerApps. After extracting the file content based 64 code, I converted it into a string variable then put the variable inside based64tobinary in PowerAutomate once the flow has been triggered. Not sure what is causing the file to be corrupted.
I am not sure either. I would start over with a simpler flow, see if you can get the upload to work. Then add the other pieces. This video would let you use the v1 trigger and set the other fields also ua-cam.com/video/e0kMjb686tc/v-deo.html
Hi Shane, I am following your video to the 'T' and keep hitting a bump at 'EasyUpload.Run( ---> there are 4 arguments expected, not 2 as in your video; yours is asking for (CreateFile_Name, CreateFile_Content) ; for some reason (User error??!), I am expected to enter (CreateFolderPath, CreateFileName, CreateFileName1, CreateFileContent) ; I don't understand where the additional arguments for CreateFolderPath and CreateFileName1 are coming from - my flow is mirroring yours. I suspect this has something to do with the Sharepoint site but tried different paths and folders and cannot get this to work. Do you have any suggestion for what else I need to check? Thank you!!!
Delete the flow and start over. You “asked in PowerApps” 4 times so that is the confusion
Thank you so much Shane for this amazing video. I just have an issue that I can't resolve. When I am trying to I click on "Button" after applying the varDemoAttachmentControl as you explained at 7:08, the "Label" box is empty and I can't see anything inside. What am I missing here?
Great video! Works great!
One question I’m not sure if there’s already a video for it but is there a way that the file can stay in my power app as well so my users can open the file straight from the app?
Nope. Power Apps doesn’t have any file viewer/editor like that.
Well done. great explanation. Bravo and many thanks
You are welcome!
Thanks this is great! Instead of the Attachments control I was able to get this working with the Add Picture control (so I can use iPad camera). It works when i upload a test image on desktop, but app freezes when I try to perform the same task with an photo I took with the iPad camera.
I've been having the exact same issue! though, with the attachment control, and on iPhone - first image will work, all else in that same browsing session fail. From what I understand, it seems that the 'appres://' + blobmanager don't play well with iPhone images. Its most frustrating, because I can't get at either of those to debug - they are obfuscated away from powerapps. If anyone has found a workaround, I would love.
First of all Big fan!!!
You've teach me a lot
Some how I am doing the same.... everything was great!!! but in the formula from minute ~19:57, I got an error (Invalid number of arguments: received 2, expected 1) but i can't get to why
Please Help!!
Check your flow. You didn’t ask in PowerApps twice.
@@ShanesCows You were right I I didn't!!! Now and I quote "YEEEEI"
This is great. Although it's kinda silly that we will always need to use an Image element to grab the binary code, but this is a great content
Thanks. Yeah imagine the random crap I had to try to figure that out. 😂
Awesome work! I think you down played the finishing touches a bit as they were some fabulous tips. 👏
Thanks Sam. I was just so excited at the big idea I couldn't even evaluate the little pieces. 🥰
Shane, thank you for your work ... is a cristal clear speach ... Thanks a lot !
Happy to help 🐶
this video is a life saver, thanks Shane!
Glad to help. 😀
hello Shane, great work as always, is there anyway to do this but with several files? not just one, with a forall function or something like that? Again thanks
Yes. A future video for sure. One of the guys on my team has done it already using a collection, a gallery, and ForAll
@@ShanesCows great idea to use a colection i will try it. Thanks
Hi shane, I got the error message at : ".......EasyUpload.Run(Last(Upload.Attachments).Name; varBase64Only)" -> The error is: Invalid number of arguments: received 2 expected 3.
Do you know what I am missing?
Thank you very much in advance!
You "Asked in Power Apps" 3 times inside the flow so you will have to pass all 3 values you added as Dynamic Content.
@@ShanesCows Thanks for your reply!
Great stuff. Now the next step is how to integrate a screen to collect metadata before uploading.
There are plenty of videos on it. Maybe this will help a bit. ua-cam.com/video/ovLIwnj6QjU/v-deo.html Taks some creativity to bridge the two
Hi Shane. For the instruction at minute 20, I'm getting an Invalid Arguments error for the "Set(varFileLink ...) command. Can you spot the error in the expression below? (I've set up the Flow and tested it successfully. The flow is called "UploadtoCDTSIOISharePointSite"
Set(varFileLink, UploadtoCDTSIOISharePointSite.Run(Last(AttachmentControl.Attachments).Name, varBase64Only).sharepointfilelink)
Looks solid. Maybe remove the flow from the app and then add it again?
This looks good Shane. Do you have any suggestions if I wanted to associate a document content type with meta data to a given document being pushed to SP?
I haven’t done exactly that but I think this video will at least give some ideas of where to start. ua-cam.com/video/e0kMjb686tc/v-deo.html
Shane thanks for the video. You are the man!
Happy to help. Have a great day. 🐶
Great piece of work, exactly what I was looking for. Thanks for sharing.
Happy to help
Hi Shane, everything is working with the exception of the file that is uploaded to SharePoint. It is an appres___blobmanager.... file, same name as you get with image1.Image. I have checked my code for the varBase64only variable against your video at 12:40 minutes. It all looks good. The only thing at 12:40 minutes that suddenly changes is the disappearance of the JSONFormat wrapper. (Tried both with and without JSONFormat wrapper which the PA editor seems to remove for you.) But I have it in my code as:
Set(var1,JSON(image1.Image,JSONFormat.IncludeBinaryData));
Set(varBase64Only,Mid(var1,Find(",",var1)+1,Len(var1)-Find(",",var1)-1));Set(varSPfilelink,'ScheduledRefresh-Test1'.Run(Last(attachment_control.Attachments).Value,varBase64Only).spfilelink);
Can you tell me if you see an error? Obviously everything else is working, otherwise I wouldn't be getting a file uploaded to SP. I still have my labels that show the var1 output (varDemo.... in your video) and varBase64only output. I test on Excel, and the correct base64only portion is being returned with the prefix stuff and last double quote all stripped out.
Also double checked Create File in work flow - the base64ToBinary() formula looks correct.
This is such an invaluable method - very awesome, thanks! Any help would be greatly appreciated.
All I can guess is you are sending the wrong parameters to flow somehow. I use this method daily and it works. The fact you are using Last(....).Value tells me you are sending the appres to flow
@@ShanesCows , you are right on! Thank you for saving me from my own stupidity. : ) I had .Value instead of .Name. Now the code to run the flow looks like:
Set(
varSPfilelink,
'ScheduledRefresh-Test1'.Run(
Last(attachment_control.Attachments).Name,
varBase64Only
).spfilelink
);
.... and I am rejoicing that it works!!
Thanks so much Shane, you don't know how valuable your help has been. I sure appreciate the quick reply. Hours saved!