This page is under construction and not yet a part of Power Library!
In the content page Document library file versus list item attachment, I discuss the differences between a file stored in a document library versus a file stored as a list item attachment, This content page shows how to upload a file from a canvas app to a document library.
Even though my by default way to go for storing files is a document library, the control used to upload a file as a list item attachment must be used. So its a good thing that Microsoft did add that feature 🙂
Adding only files is often not enough. The files must contain metadata. This can be done too though not in the same action as uploading the file. A second action must be added for this.
Files can be uploaded in the root of a document library but also in a folder.
I have created a video which explains all the details on adding a file from a canvas app in a SharePoint library:
- Adding the attachment control.
- Configuring the attachment control.
- Creating the cloud flow used to upload the file.
- Adding a single file or adding multiple files.
When images are uploaded using this method, for example from the image gallery on a mobile device, no loss in quality will occur.
As a bonus, the cloud flow created is very generic. No hardcoded values are used. Also not for the metadata.
- To be added.