How to pass Cropper Js coordinates to my model #125
Unanswered
grappetite-tahir
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using spatie medialibrary and its working ok. Because i was using the fixed hard coded values for cropping the conversions. But now I'm planning to use the front end js library to select the selected area of image and then crop accordingly. The issue is when I try to upload the file using medialibrary and then put the manipulation code which I found from documentations and github issues is not working it giving me this error if i m trying it from my controller method after saving my model like this
If i remove these lines from above code then my conversion from inside model done, but i'm facing issue to pass the dynamic data to my model so I tried chaining these lines in my controller but it gives me error which is below;
->addMediaConversion('thumbnail')->manualCrop(350, 200, 20, 20);
With above lines i'm getting this error;
Call to undefined method Spatie\MediaLibrary\Models\Media::addMediaConversion()
Beta Was this translation helpful? Give feedback.
All reactions