Hey everyone. I'm converting the image-size projec...
# suitescript
a
Hey everyone. I'm converting the image-size project from nodejs to SuiteScript, and I'm unsure how to proceed. I need a way to load the image file into a Uint8Array. nodejs has the fs module but that's much more like PHP's module, and NetSuite has something different, the N/file module. Can I do with just File.getContents() or would that possibly read incorrectly since it's assuming I want text instead of whatever image files are encoded as?
c
Here's an ENUM of all supported file types that can be used with N/file https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_4228999954.html
It does look like that's only used with file.create() though
👀 1
Best thing you can do is test this - write a small amount of code to read your file contents to see what it looks like.
SS isn't known for its image file processing capabilities though..
a
Thank you 🙂 "SS isn't known for its image file processing capabilities though.." That's the gap I'm trying to fill.