Adding to want
@Steven Shull has mentioned in his answer, the code should be something like the below. This is written for Asset Object Launch Point.
from java.io import File
path = mbo.getString("DOCLINKS.DOCINFO.URLNAME")
print("The Path Value:",path)
if (path):
file = File(path)
print("The Size of the File",file.length())
print("The Size of the File in MB",file.length()/1024)
print("The Size of the File in GB",file.length()/(1024 * 1024))
------------------------------
Keshav Ravindran
Bct
------------------------------
Original Message:
Sent: 06-20-2022 04:18
From: Harshavardhan Kamepalli
Subject: How to Know the size of attachment sent through E-mail?
Hi,
We have an functionality of sending attachment through e-mail whenever an PO is approved. But when the attachments size is greater than 10 MB, the email is not sent because of the postfix attachment limit is '10 mb'.
Now, I have an requirement to log these failed emails and to know the attachment size for each PO before sending an e-mail when approved.
Is there any way to find these cases?
#Administration
#Customizations
#Utilities
------------------------------
Harshavardhan Kamepalli
Accenture
------------------------------