RE: Is there any work arounds to create a file(with size greater than 10MB) in NetSuite using suitescripts?


Hope you are all safe and doing good,

Right now we have a situation to create a file which size is larger than 10MB, but Netsuite suitescript file API has a limitation – only the files less than 10MB are accepted using suitescripts file API,

I would like to know, is there are any workaround solutions for this?

Please suggest!

Appreciate your quick help here.

Thank you

super Rookie Asked on July 7, 2020 in SuiteScript.
Add Comment
2 Answers

Yes, with SuiteScript 2.x using the N/file module, it is possible to create larger files by streaming the content.  You can write out a file by appending individual lines, and each line can be up to 10MB in size.

Beginner Answered on July 7, 2020.


Thanks for the reply here, here we are trying to create PDF files from another system through SOAP and REST API’s , some times the files contains scanned documents instead of lines, how can we handle this situation? is streaming works here?

on July 7, 2020.

Your original post mentioned the suitescripts file API, so my answer was related to that specifically.  There wasn’t any mention of SuiteTalk.  I don’t know if there is a way for the SOAP or REST API’s to overcome that limit, though it might be possible.  A Restlet script might work, as it can act as both an external web service endpoint, and has the ability to run SuiteScript code to perform custom actions.

You say you are trying to create PDF files from another system.  Are the files in the other system already PDF’s, and you just want to copy them to NetSuite?   I would generally advise against that, especially if you aren dealing with a lot of large files, as NetSuite accounts have limited storage.  If you exceed that storage then it can end up costing you a considerable amount having to upgrade to a higher tier.   Is there a specific reason the documents have to be stored inside of NetSuite?  What is the use case for placing these files into NetSuite?

on July 8, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.