Upload files through API and use them as attachments for Ideas

I am migration Ideas from a 3rd party platform into Verint (version 13.x). 

Many of the ideas have image and file (pptx, pdf etc) attachments. I am using the following REST API to upload these files into Verint. 

community-ppe.thomsonreuters.com/.../temporary.json

thereafter, I am using the downloadUrl returned by the above API to use it in href attribute within the content of the idea description. Initially, it all works well - i am able to view the uploaded file on the idea - if its an image, it appears inline where it should, if its a file, a link appears and I am able to download the file too,

However, if I check the same idea a day or two later, all the images/files have broken links - I am guessing its becuase the upload is taking place to some temporary location as indicated by the API endpoint. How do I make these uploaded files and their url persist permanently?

Has anyone tried doing this? 

Parents
  • Note: The original question was posted in two different Groups. I'm copying my answer here as well in case someone comes here first.

    When you upload an image it will drop it into a file store called "CommunityServer-Components-MultipleUploadFileManager", which you can see in the URL. This is a temporary file store. And then, when you reference this URL or the UploadContextId in the content it will move the file to a different store depending on the content type you are using it in.

    So what you should expect is that you upload the file, and then use it in the body of an Idea like this:

    <img src="{{DownloadUrl}}" />

    And then as as soon as you create the Idea the image URL should change automatically. You can see this by viewing the Idea in your web browser and looking at the source HTML. You should see that the URL has changed, and will not reference the file store used for Ideas.

    If the URL doesn't change, then something isn't working right. Make sure that you are using the DownloadUrl as-is so that Verint can recognize it and handle it properly.

    Satish also linked to a solution about using the View Macro. You can use the View Macro instead of an <img> tags, and it can be used for not only images but also Word Docs, PDFs, and other embedded files. It works by putting this into the body:

    community.telligent.com/{{UploadContextId}}:{{Width}}:{{Height}}

    Example: [View:https://...:{{Width}}:{{Height}}:0:0]

    I generally tend to use the <img> tag for images because then I can include other attributes for the image. But I will use the View Macro for embedding file links.

    Some troubleshooting suggestions:

    • Make sure that the UploadContextId is unique for each file you upload
    • Make sure that you use the full and unedited DownloadUrl when using it in an <img> tag or View Macro
    • Make sure that the same user account is used to upload the image and create the Idea
    • Make sure that you create the Idea soon after you upload the image. Within an hour should be fine.

    There is a Job in Verint that runs every so often to delete files in the temporary file store. I think it typically runs every few hours or so, so the image will sit there for awhile, but will eventually get deleted automatically unless Verint moved the file to a non-temporary file store.

Reply
  • Note: The original question was posted in two different Groups. I'm copying my answer here as well in case someone comes here first.

    When you upload an image it will drop it into a file store called "CommunityServer-Components-MultipleUploadFileManager", which you can see in the URL. This is a temporary file store. And then, when you reference this URL or the UploadContextId in the content it will move the file to a different store depending on the content type you are using it in.

    So what you should expect is that you upload the file, and then use it in the body of an Idea like this:

    <img src="{{DownloadUrl}}" />

    And then as as soon as you create the Idea the image URL should change automatically. You can see this by viewing the Idea in your web browser and looking at the source HTML. You should see that the URL has changed, and will not reference the file store used for Ideas.

    If the URL doesn't change, then something isn't working right. Make sure that you are using the DownloadUrl as-is so that Verint can recognize it and handle it properly.

    Satish also linked to a solution about using the View Macro. You can use the View Macro instead of an <img> tags, and it can be used for not only images but also Word Docs, PDFs, and other embedded files. It works by putting this into the body:

    community.telligent.com/{{UploadContextId}}:{{Width}}:{{Height}}

    Example: [View:https://...:{{Width}}:{{Height}}:0:0]

    I generally tend to use the <img> tag for images because then I can include other attributes for the image. But I will use the View Macro for embedding file links.

    Some troubleshooting suggestions:

    • Make sure that the UploadContextId is unique for each file you upload
    • Make sure that you use the full and unedited DownloadUrl when using it in an <img> tag or View Macro
    • Make sure that the same user account is used to upload the image and create the Idea
    • Make sure that you create the Idea soon after you upload the image. Within an hour should be fine.

    There is a Job in Verint that runs every so often to delete files in the temporary file store. I think it typically runs every few hours or so, so the image will sit there for awhile, but will eventually get deleted automatically unless Verint moved the file to a non-temporary file store.

Children
No Data