filestack / filestack-ios

Official iOS SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
MIT License
55 stars 36 forks source link

iOS display image #53

Open neo0x0 opened 5 years ago

neo0x0 commented 5 years ago

iOS Documentation needs update or explanation. I want to display image but get error.

Code official doc says:

  1. import FilestackSDK
  2. let filelink = transformable(handle: "g8fLXNCRT4K3TJSUFrRW")

Github gives nothing on this, only about displaying picker/upload https://filestack.github.io/filestack-ios/

rnine commented 5 years ago

@neo0x0 Could you explain in more detail what are you trying to achieve?

emajewicz commented 5 years ago

I believe that this is the same issue that I am encountering. Without a transformation the image displays fine

let fileLink = fsClient!.sdkClient.fileLink(for: handle);

However when using a transformation I get an error

let transformable = fsClient!.sdkClient.transformable(handle: handle);

The error I receive when trying to display the image is "conv20 provider error: Failed to identify the file, probably corrupted image provided (idx 0)"

rnine commented 5 years ago

@emajewicz Could you please provide some more context?

Specifically, it would be helpful to know:

  1. Format (png, jpg, etc.) and dimensions of the image file referenced by handle
  2. Transformation chain used (including all their associated parameters).

Thanks!

winzig commented 1 year ago

I know this is old, but just today we have encountered this again. Typically we see this issue when the file is a BMP file, and we're trying to render it as a JPG or PNG. For some reason, Filestack is unable to convert it and claims it's corrupted, but I'm able to view the underlying file just fine. I've emailed support@filestack.com just now with details and a specific example, which I can't reveal here publicly for privacy reasons. (Ticket # 60857)