SOLVED : Crop Image does not working in S3

sunnyjey

Active Member
I just discovered the wonderful Crop option for the Upload File element. It looks it does not work for S3 Amazon storage. Is it due to some bug introduced during upgrade or S3 limitation as I do not see any disclaimer about it on WIKI.
 
I've never tested it with S3, it's not a feature I ever use, and few people use it, and of those I guess nobody uses S3. So it's very much a corner case. But as thumbs work with S3 (or did last time I checked) there's no systemic reason it shouldn't work, so it's probably just a case of me finding some time to debug and fix it. I'll try to make some time early this week.

Sent from my Pixel 2 XL using Tapatalk
 
But as thumbs work with S3 (or did last time I checked) there's no systemic reason it shouldn't work, so it's probably just a case of me finding some time to debug and fix it. I'll try to make some time early this week.

I checked, Thumbs are working well with S3. Not Cropping.

Please try to fix.
 
For me both don't work anymore. Only the big uploaded images I can display via cloudfront.net Another new issue is that EXIF rotation is also not correct anymore, while if I enter the URL of the image then the orientation is correct.
 
@cheesegrits

Friendly bump, in case if you have free Time for debugging this issue.

I'm working on it today. I can see where the problem is, where it builds the path, I'm trying to fix it in a way that won't break local storage.

BTW, I also had to set a CORS policy on my bucket to get the image to load correctly into the popup for cropping ... although it still doesn't work correctly on submit because of the path issue.

-- hugh
 
@marozen - can you open a new thread for your issues.

@sunnyjey - cropping is hopefully fixed with this commit:

https://github.com/Fabrik/fabrik/commit/71eca39e5ddd9dd7fa64a1ea32d3aa80f30017e9

As mentioned in my previous post, to do the actual cropping, where the newly selected image is popped up and you crop it, you will probably need to have a CORS cross-origin config on your bucket.

But the commit above should fix the bigger issue of it getting the file path correct and storing the cropped data.

-- hugh
 
Yes. It is working with S3. Thank you so much.

I have kept CORS config of Bucket (still playing with the CORS with different GET/PUT and http: / https: protocols).

Code:
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <MaxAgeSeconds>3000</MaxAgeSeconds>
    <AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>

But, I have now another path-to-crop-image issue related to the Slideshow. Will open new thread.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top