Crop Image - Forum

Forum Navigation
You need to log in to create posts and topics.

Crop Image

I used Croppie for cropping images in VisualNEO Web, but when I crop, it generate this error:

typeError: can't assign to property "guid" on "demo/demo-2.jpg": not an object

How can I solve this problem?

 

Uploaded files:
  • You need to login to have access to uploads.

@asmat

I unzipped the file ... it contained the .neoapp file and the .png file.

In your .neoapp, Project >>> Properties >>> Libraries/Files ... references F:\....\.croppie.css and r F:\.....\croppie.min.js  ... these files are not in the .zip that I downloaded.

1) it is not possible to run the App without these files
2) I don't know the content of the .css file

typeError: can't assign to property "guid" on "demo/demo-2.jpg": not an object

It might have something to do with this code ...

basic.bind({
url: 'demo/demo-2.jpg',
});

... it refers to the demo/demo-2.jpg ... which hould be in the same http/https location as the current location ... but if you are running the App from your local drive, the current location is something like file://etc/etc ... see https://foliotek.github.io/Croppie/#documentation for more information.

Hi @Gaev, the below attachment contain css and js file that I mistakenly sent .zip file without them, please take a look to that.

If it possible please make a sample for me. because i can not realized anything about error from above reference.

Uploaded files:
  • You need to login to have access to uploads.

Not much time to play with this library but I got the same error than you @asmat. There must be something we are missing about the library.

asmat has reacted to this post.
asmat

@asmat

1) With the latest package, I was able to get the circle to appear when I clicked on the initialize button.

2) However, clicking on the crop button gives me the same console error.

BTW, GUID stands for Globally Unique Identifier. It is a 128-bit integer number used to identify resources.

I believe the message comes up because the url property passed to the basic.bind method is expecting a file that is accessed via the http/https protocol.

I tried specifying an image file on a server, but then I ran into CORS restrictions  ... because CORS does not allow access from Apps running from local (file://) resources.

I suggest that you try and run your App from a server location ... perhaps using VisualNEOWeb's neoPhp server (make sure the file specified in the url property is available to the neoPhp server).

When I get some time, I will try and follow/replicate the examples here ... https://foliotek.github.io/Croppie/