The HTTPPart class / com.HTTPPart methods |
Creates a new HTTPPart object based on given filename located on disk.
CreateAttachment( filename STRING) RETURNING part-object com.HTTPPart
Creates a new HTTPPart object based on given filename located on disk. To be used via the addPart() method.
LET part = com.HTTPPart.CreateAttachment( "/opt/myapp/resources/logo.jpg" )
Content-Type: image/jpeg Content-Transfer-Encoding: binary Content-Disposition: attachment; filename="logo.jpg"
In case of error, the method throws an exception and sets the STATUS variable. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).