Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Parse Symfony 3 #106

Closed
7tomas7 opened this issue Jun 4, 2017 · 1 comment
Closed

JSON Parse Symfony 3 #106

7tomas7 opened this issue Jun 4, 2017 · 1 comment

Comments

@7tomas7
Copy link

7tomas7 commented Jun 4, 2017

Hi.
Something is wrong with JSON.
I line:
var options = $.parseJSON('{"uploadConfig":{"uploadRoute":"comur_api_upload","uploadUrl":"C:\\wamp64\\www\\premade\\src\\PremadeBundle\\Form\/..\/..\/..\/..\/..\/web\/uploads\/myentity","webDir":"uploads\/myentity","fileExt":"*.jpg;*.gif;*.png;*.jpeg","libraryDir":"C:\\wamp64\\www\\premade\\src\\PremadeBundle\\Form\/..\/..\/..\/..\/..\/web\/uploads\/myentity","libraryRoute":"comur_api_image_library","showLibrary":true,"saveOriginal":false,"generateFilename":true},"cropConfig":{"minWidth":588,"minHeight":300,"aspectRatio":true,"cropRoute":"comur_api_crop","forceResize":false,"thumbs":null},"fieldImage":null}');

When I click Edit is
7:1 Uncaught SyntaxError: Unexpected token w in JSON at position 66 at Function.parse [as parseJSON] (<anonymous>) at HTMLDivElement.<anonymous> (7:327) at HTMLDivElement.dispatch (jquery.min.js:3) at HTMLDivElement.q.handle (jquery.min.js:3)

So it cant crop.

My Form Type:
->add('image', CroppableImageType::class, array( 'uploadConfig' => array( 'uploadRoute' => 'comur_api_upload', //optional 'uploadUrl' => __DIR__.'/../../../../../web/uploads/myentity', // required - see explanation below (you can also put just a dir path) 'webDir' => 'uploads/myentity', // required - see explanation below (you can also put just a dir path) 'fileExt' => '*.jpg;*.gif;*.png;*.jpeg', //optional 'libraryDir' => null, //optional 'libraryRoute' => 'comur_api_image_library', //optional 'showLibrary' => true, //optional 'generateFilename' => true //optional ), 'cropConfig' => array( 'minWidth' => 588, 'minHeight' => 300, 'aspectRatio' => true, //optional 'cropRoute' => 'comur_api_crop', //optional 'forceResize' => false, //optional ) ))

If somebody knows what is wrong, please help.

@comur
Copy link
Owner

comur commented May 30, 2019

Too old. I close. Feel free to open new issue if you have any problem

@comur comur closed this as completed May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants