javascript - PHP/JS Froala imag upload not working properly -
I copied, copied and edited the script (one bit), but in some way it does not seem to work, T also get a response Here my code is:
upload.php:
upload.js (included on my website):
$ (function () {$ ('# edit'). Editable ({/ Set the image upload parameter imageUploadParam: Set the 'file', // image upload url ImageUploadURL: '/upload.php', // corus only if required.CrossDomain: false, // Additional upload parameter imageUploadParams: {Id: 'edit'}, // set image error callback imageErrorCallback: function (error) {// custom error message returned from server if (error.code == 0) {error: 'My custom error message '} // Bad L A. Else if (error.code == 1) {error: 'bad link.'} // No link in upload response. Else if (error.code == 2) {error: 'no link in upload response. Error} while uploading file. Else if (error.code == 3) {error: 'Error during file upload.'} // parsing response failed. Else if (error.code == 4) { Error: 'Parsing feedback was unsuccessful.'} // Large image. Else if (error.code == 5) {error: 'Image is too large.'} // Invalid image type. Else if (error.code = = 6) {Error: 'Invo lid image type. '} // image can be uploaded only in 8 and IE 9 in the same domain. And if (error.code == 7) {error: 'image can only be uploaded to 8 and IE in the same domain 9.'}}})}); I looked everywhere to find a solution but the problem is still unresolved, please help me, I appreciate it
Not sure if this will work or not, but try to give full url in line
$ response-> ; Link = "{absolute_url_to_image} / images /". $ Name; This is working well for me
Comments
Post a Comment