Is there a way to attach files and use it in service api as file to upload it to other sites
You can use an entity node with the “Attachment” type which will prompt the user to upload a file and then you can use the entity node output to pass this to the service node API.
Hi @yogaramya.mendu ,
In my API I need to give like ‘uploadFile=@ location of the file on file system’, here how can I mention the location in kore.ai
When a file is uploaded to the entity node, the file object is returned as per the following screenshot:
Also, in the context object >> botUserSession >> channels, you can observe the attachment object.
Let us know if you need any further clarification.
I can upload the image file and able to get the url,
after that i need to use this image file in a API(service node in kore.ai), by mentioning the filename along with path of the file for example in curl,
-F ‘table_name=incident’ -F ‘table_sys_id=xxxxxxxxxx’ -F ‘encryption_context=undefined’-F ‘uploadFile=@ location of the file on file system’
So, how to do this in kore.ai service node, for example
I tried this, but it is not working
Any update on this?
Here I need to attach the file in API, ‘uploadFile=@ location of the file on file system’.
Could you solved this issue? I was looking for the same.
We have discussed this with our internal teams and observed that if your requirement is to pass the uploaded file to an API that can store the file in the required location, then passing the fileUrl alone will not help you achieve the requirement.
The fileUrl that is generated when a file is uploaded is only for one-time use i.e., once the URL is accessed to download the file, then it will be erased.
Hence, to achieve your requirement, we would need to download the file through botKit and then pass it to the respective API.
To understand more on botKit, please find the below documentation link:
However, we will further discuss this implementation with our development team and will let you know the implementation steps further.
Do we have any update here,
Can we attach the file url/location directly to service node?
No in a service node you cannot use a URL to simulate a file attachment. Unless the end API uses a link a downloads the file you cannot use it. The attachment url generated by Kore is one time access only. So, if you need to access the file and pass it on as file, you can download it in botkit, save locally and pass it on to any third party application of your choice.