Hi All. Is there any method that I can get the image width and height from File Cabinet please?
c
Craig
12/22/2023, 10:21 AM
If this information isn’t on the file record, you’ll need to calculate it with SuiteScript.
b
Boris Yasen
12/22/2023, 10:21 AM
How could I calculate it?
c
Craig
12/22/2023, 12:22 PM
Off the top of my head, I'd use a UserEvent script on the File record. When the file record saves, I'd use some SuiteScript code to inspect the file extension to make sure it's an image, then I'd calculate the size using a JavaScript library, I'd then save the dimensions on the file record.
This assumes that the file record is scriptable.
You'd need a developer to investigate and put this together.
Craig
12/22/2023, 12:23 PM
If your'e using SuiteCommerce, maybe the image dimensions are already saved somewhere?
Craig
12/22/2023, 12:23 PM
Otherwise, I think SuiteScript is the only answer here and it would need a bit of analysis.