Closed PGMacDesign closed 5 years ago
After a good amount of trial and error, it looks like there is no SDK solution for this.
I ended up creating a mini SDK (single call) to interact with this endpoint -- https://www.filestack.com/docs/api/file/#md-request
From there, I would get back the handle String and send it to this code and receive back the metadata.
That metadata contains all of the parts to build / create the S3 URL link by combining the container + path + regular S3 url schema.
Sigh. If anyone implemented my solution here between May 15 and October 2019, the dev team updated the base URL and broke the old entirely without any notice whatsoever.
Switch to the new API URL: https://www.filestackapi.com to get the code working again.
I am using the upload method as mentioned here and successfully uploading an image to FileStack. As per the sample code here, I am able to retrieve the handle String. The problem is that we have things auto-configured so that the code will auto upload to the S3 bucket and I need to retrieve the S3 key from the response.
When our server uploads an image, they go through the pick and store flows and eventually retrieve back this response:
(Note that I changed the characters to mask our original image)
Which clearly has the handle at the suffix of the url, but it also includes a Key, which is what I need to obtain.
How do I go about obtaining this key with only the handle to work with? Can it be done by chaining different methods in the Java SDK? Or is there a way to convert it somehow into the key I need?