artmov
Scholar

File Upload Example

Jump to solution

I am trying to use a File Upload Control.  Ultimately I need to store it to Azure Blob Storage, but for now I just want to store it to OneDrive.  I cannot find an example of how it is done.  According to documentation I have to set up a Default File Storage, but I don't have that option.  I have File Upload Storage.  I guess that is file, since it is saving the attachment as a Collection Variable.  What I don't see is how I am going to get that variable to store it to One Drive, or eventually to Azure Blob Storage.

Regards.

Labels: (1)
0 Kudos
Reply
4 Replies
jesse_mchargue
Nintex Workflow Cloud Expert
Nintex Workflow Cloud Expert

Re: File Upload Example

Jump to solution

Hello @artmov 

 

Default file storage is being deprecated, so you can ignore that post. Here is a link to the FAQs around why we are moving away from that: https://help.nintex.com/en-US/nwc/Content/Settings/DefaultFileStorageFAQ.htm

 

Regarding how to store a file that was attached to a File Upload control on a NWC form, you can easily do this by using any of the "Store a file" actions within NWC. These actions are for Box, Dropbox Business, Google Drive, SharePoint Online, MS OneDrive for Business.

 

To store your file, you just need to make a connection to the storage location and then select the file that you want to store (file upload) and destination within storage (path).

 

Here is an example of a file I am storing in OneDrive at the root (no subfolder) and am overwriting the file if it exists:

jesse_mchargue_0-1652813848004.png

 

Also, here is a link to the OneDrive "Store a file" help docs in case you need more details: https://help.nintex.com/en-US/nwc/Content/Designer/Actions/OneDriveforBusiness-StoreaFile.htm

 

Hope this helps!

Reply
artmov
Scholar

Re: File Upload Example

Jump to solution
Great! That worked.
Any idea how to store it in Azure Blob Storage?
0 Kudos
Reply
jesse_mchargue
Nintex Workflow Cloud Expert
Nintex Workflow Cloud Expert

Re: File Upload Example

Jump to solution

Hey @artmov 

 

This would have to be done via APIs. Looking through the APIs for Azure storage, you would need to potentially do a "Create File" to create the actual file, and then a "Put Range" to write the content into the file.

https://docs.microsoft.com/en-us/rest/api/storageservices/create-file

https://docs.microsoft.com/en-us/rest/api/storageservices/put-range

 

I have not used Azure Blob Storage so am unaware if there is an easier way to pass the file between NWC and the file storage.

0 Kudos
Reply
jesse_mchargue
Nintex Workflow Cloud Expert
Nintex Workflow Cloud Expert

Re: File Upload Example

Jump to solution

Hey @artmov 

 

One place I forgot to look was in our Gallery! We have an xtension that was built out and shared. I would take a look there and see if it fits your needs.

 

https://gallery.nintex.com/t/upload-file-to-azure-blob

 

Hope this helps!

Reply