Skip to main content
Nintex Community Menu Bar
Question

Upload Images to Sharepoint

  • June 13, 2024
  • 8 replies
  • 104 views
  • Translate

Forum|alt.badge.img+1

Hi, good morning

 

I’m trying to upload a multiple images files stored on my sql database to a sharepoint site with a workflow, but it is impossible for me.

The image is saved in format <image><name></name><content></content></image>.

I think the best option would be format as XML, but there are no option in workflow settings.

The purpose of this is to free the GB that these images occupy in the database and leave them in the cloud

 

Anyone can help me?

 

Kind regards,

Isaac Labuena

Did this topic help you find an answer to your question?

8 replies

IvanK
Nintex Employee
Forum|alt.badge.img+3
  • Nintex Employee
  • 11 replies
  • June 13, 2024

Hi @IsaacL 

 

The SharePoint smartobjects for document libraries use a file property to upload documents. The same type property should be returned by a database smartobject. So in your process just read a file from a database and then upload it to sharepoint.

 

Translate

Forum|alt.badge.img+2
  • Nintex Employee
  • 5 replies
  • June 13, 2024

To elaborate on Ivan’s suggestion - If you generate smartObjects from a SQL table which already contains file content, the smartObject property type will be set to a memo field - This will return the text as is in the XML format you see. 
To get the SQL SmartObject to interpret the field’s XML value as file/image, you need to change the generated SQL SmartObject’s property to type File.
Once that is done, you can use the property as any other File property without needing to handle the XML data manually. 

Translate

Forum|alt.badge.img+1
  • Author
  • Novice
  • 3 replies
  • June 13, 2024

Hello,

 

I have this configuration on smart object:

 

I have the “image” type because I use a smartphone to take the pictures and when I click on image control it opens the camera of the smartphone.

Next on Workflow I have that:

And here the screenshots step by step:

  1. SmartObject (filtered to test only one img):
  1. Add document to library (using reference and image control):
  2. Send Mail (i’m trying to show the item link):

  3. And on email doesn’t appears the link:

  4. And I can’t found on sharepoint library:

  5. Finally if I go to Reports tab I found the execution of that:

 

 

I don’t know what I’m doing wrong.

 

Thanks,

Isaac Labuena

 

Translate

Forum|alt.badge.img+2
  • Nintex Employee
  • 5 replies
  • June 18, 2024

Hi Isaac

As far as I can remember, List methods do not return the contents of file properties as it could result in large amounts of data, even though your filter might be reducing it to one item - And I believe this is why no records are being created in the document library. 

As a test, I would first update the document library step to load the file through a load/read method and hardcoding the ID of the record to a known ID that contains a file. (You can use inline context field loading of the file if you want as a test). 

If that works, then your workflow must be updated to either loop through the list method’s returns if you expect more than one file can exist and then use the load/read method based on the loop-item’s ID, or if you expect only one file to return based on the filter, then you can use the return id of the list method is the input of the load/read method. 

Translate

Forum|alt.badge.img+1
  • Author
  • Novice
  • 3 replies
  • June 18, 2024

Hi ChristoffB

 

Thanks for your answer, I tried to reproduce the steps you mentioned, but the images can’t upload to sharepoint.

 

 

With these steps I can attach the image to the email, but it is not what I want:

Do you know of any other solution to achieve this?

 

Thanks,

Isaac Labuena

Translate

Forum|alt.badge.img+2
  • Nintex Employee
  • 5 replies
  • June 18, 2024

I was able to create a workflow with your exact scenario - The only difference was that I used the document library’s associated smartObject directly instead of the “Add document” step, but there should be no difference. 

Note in the screenshots that on the first step when executing the list method, I changed the option to only return the first item - This was just done for simplicity to test things out. 
When running the workflow, it successfully created the file in SharePoint
 

First step executing the SQL table list method

​​​​​
Second step upload document to sharepoint inputs
Add the identifier field of the reference as the input to the Read method

 

Translate

MillaZ
Nintex Employee
Forum|alt.badge.img+21
  • Nintex Employee
  • 671 replies
  • June 24, 2024

Hi @IsaacL 
Have you managed to solve your question?

Translate

Forum|alt.badge.img+1
  • Author
  • Novice
  • 3 replies
  • June 26, 2024

Hi, 

Sorry for the delay.

I have tried all the solutions that you have told me about. But none with success, I'm starting to think it's a problem in my environment.

Kind regards,

Isaac Labuena

 

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings