Forum Discussion
Hi Kent,
I am not sure if you can use "setFileProperty" for uploading thumbnails. Regular "file" properties just contain the id of the file. The thumbnail property works different. Take a look at an existing thumbnail property and check the property value. It´s something similar to "vault://12345".
How does your "strImagePath" look like? Does it contain the vaulted file already or is it a link to a local file on your pc? In this case you have to upload the file before you can set is at property.
Angela
- KentKeller5 years agoIdeator II
Thank you for your reply. The strImagePath variable = "C:\Users\kkeller\Pictures\111080-01.bmp"
This file lives on the server, which is the local machine in my case right now (having failed using an unc path in a shared Aras environment, I attempted to eliminate possible problems by restricting to one box).
I am aware that the file in the innovator.part.thumbnail field is something like "vault:///?fileId=D5612B10085449F5AD7B22155B106E43", if you select a file with the normal interface, and this is working; eliminating a file permission error.
Looking at the innovator.file table, I found the file that I uploaded manually to another item. Using the found ID, I then executed the following line:
PartItem.setProperty("thumbnail", "vault:///?fileId=D5612B10085449F5AD7B22155B106E43")
This worked. So the problem is the actual uploading of the file to the vault, not the updating of the innovator.part.thumbnail field.
As I stated, the innovator.part.thumbnail does get some unknown GUID, but no new entry appears in the innovator.file table.
If I could find a function that simply vaults a file, I could do this in two steps.
But, for now, I am stalled out.
- angela5 years agoCatalyst II
Do you want to solve everything in c#, or would a js / c# combination work for you?
This is an earlier question I had regarding the file picker.
Notice Chris´ sample for uploading file. I myself use a variant of this one to upload my local files and build items from them.
---You liked this answer? Visit my Youtube channel!!!