I created the file in File cabinet with available ...
# general
s
I created the file in File cabinet with available without login checked and I called the URL in the script but it does not download a file
m
Hey @Sai Kumar Chintala You'll want to use a Suitelet to serve the file. Something like the following:
function slet_called(request, response) { //get the file_id from the query paramater var file_id = request.getParameter('file_id'); try { //get the file file = nlapiLoadFile(file_id); //write the file to the response response.setContentType( 'rtf', file.getName(), 'attachment' ); response.write(file); } catch(error) { //do something if the file doesn't exist anymore } }
Also, don't do 'without login'.
With the Suitelet, you can just grab the file no matter what.