I try to upload the image in telligent, I got the error response "Bad Request".
Kindly Help Us.
I try to upload the image in telligent, I got the error response "Bad Request".
Kindly Help Us.
There are a few issues with your request.
The "Bad Request" response is because the URL formed with your parameters will not be recognized because the format of the parameters is incorrect (its not sending a valid fileStore or filePath).
All that said, this endpoint/API doesn't do what you want--it is for retrieving files, not uploading.
The upload endpoint documentation is here: Upload Cfs REST Endpoint -- it allows the temporary uploading of a file that can then be referenced by the context and filename for use in other REST APIs.
Hi,
I try image uploaded, I got the error "No file was found in the request or the file could not be read",
I given FileName both , I got same error in response.
'FileName': 'D://Newfolder//g6.png'
or
'FileName': 'g6.png'
FYI,
Velocity code:-
#set($stringResponse = $core_v2_uploadedFile.CreateContextId())
Javascript:-
jQuery.telligent.evolution.post({
url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/cfs/temporary.json',
data: {
'UploadContextId': '$stringResponse',
'FileName': 'D://Newfolder//g6.png'
},
success: function(response) {
debugger;
},
error: function(xhr, desc, ex) {
jQuery.telligent.evolution.notifications.show(ex, { type: 'danger', duration: 10000 });
console.log(desc);
console.log(ex);
}
});
I need to upload an image in the rest API, Can anyone share the code, please??
Thanks & Regards,
Sakthivel E
The upload handler does not accept a file name, it expects the file content. A full implementation of file uploading within a widget is available here: Working with User-uploaded Files
Ben Tiedt Thank you so much
Hi Ben Tiedt ,
I uploaded the image now, I need to get the URL link and files in the method $core_v2_uploadedFile.
I need to download the image now, Kindly guide us.
Hi Ben Tiedt ,
I uploaded the image now, I need to get the URL link and files in the method $core_v2_uploadedFile.
I need to download the image now, Kindly guide us.
The file can be retrieved from the core_v2_uploadedFile API using the same context ID and filename you provided to the upload UI.
Note that the file uploaded this way is stored temporarily for use by other APIs (referencing the file by context ID and filename) and, in this location, it is not accessible to other users.