There are no forum posts on this topic! Why don't you write one?
Hello how can I specify a custom filename with screenshot being saved to S3? My code is not working to specify a custom filename.
Here is my code:
from GrabzIt import GrabzItImageOptions
from GrabzIt import GrabzItClient
def get_screenshot(tx_id, filename=None):
grabzIt = GrabzItClient.GrabzItClient("mykey", "mysecret")
options = GrabzItImageOptions.GrabzItImageOptions()
options.format = "jpg"
options.browserWidth = 650
options.browserHeight = 715
options.delay = 1000
options.requestAs = 1
if filename:
options.customId = filename
options.exportURL = "s3://key:secret@us-east-1/mybucket"
grabzIt.URLToImage(url, options)
grabzIt.Save()
**** Note: the docs say to specify a customId in the options but the output keeps showing up in my S3 bucket with the name of my Grabzit key...?
As per the documentation this is not supported: https://grabz.it/support/article/export-capture/
This is to stop having to handle problems with filename collisions in the different systems. If you would like to change the name there you will need to implement this yourself.
The customid is what is returned to the handler so you can identify a capture.