cropperjs

ActionView::Template::Error (undefined method `image_url' for #<ActionView::Helpers::FormBuilder:0x00007f921c2ac9b0>)

安稳与你 提交于 2021-02-11 15:45:06
问题 I'm using the shrine gem in form object, I want to clip images, so, I followed https://github.com/shrinerb/shrine/wiki/Image-Cropping, but, happed above error, I think that it seems to be don't recognize photos models views <%= form_with model: @blog_form , url: user_blogs_path ,local: true do |f| %> <div class="field"> <% f.label :title %> <%= f.text_field :title %> </div> <div class="field"> <% f.label :content %> <%= f.text_area :content %> </div> <div class="field"> <% f.label :user_id %>

Module not found: Error: Can't resolve 'cropbox' 2

走远了吗. 提交于 2021-01-29 16:27:49
问题 I asked question Module not found: Error: Can't resolve 'cropbox' But I didn't get an answer, so I have to focus on more specific issues and searching in StackOverflow, So that I get three problem 1 rails doesn't load cropbox.js 2 clopbox.js couldn't export cropbox function 3 fileUplod.js couldn't import cropbox function this is the result what the as one of the above problem part of application.html.erb: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %

How to recieve image blob data by Cropper Js in laravel controller

我的未来我决定 提交于 2021-01-27 23:31:47
问题 I am working with cropper js and laravel, I cropped the image and put it into the formdata and send it to the Laravel controller by Jquery Ajax. The problem it that I do not get data in controller. but only get an error. the code is given below: HTML <button type="button" name="button" id="crop">Crop</button> <img src="{{asset('public/img/img.jpg')}}" id="image" alt="" style="height: 500px;"> Jquery and Cropper Js Code <script src="{{asset('public/js/jquery.min.js')}}"></script> <script src="

How to rotate an image using Angular 5 and angular-cropperjs?

删除回忆录丶 提交于 2019-12-14 04:22:43
问题 My objective: To upload image file in my browser, edit(crop & rotate) it and download/upload it. What I have achieved so far: I am just able to rotate the image but just for once. What issues I'm facing: As mentioned in the official docs, I'm not able to use this.angularCropper.cropper.rotate(degreeInNumber); it gives this error: Cannot read property 'rotate' of undefined . As it is a wrapper around CropperJS a popular JS image library, so I tried CropperJS's syntax this.cropper.rotate