kartik-v / bootstrap-fileinput

An enhanced HTML 5 file input for Bootstrap 5.x/4.x./3.x with file preview, multiple selection, and more features.
http://plugins.krajee.com/file-input
Other
5.36k stars 2.39k forks source link

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data. #301

Closed abdullah-zudioz closed 9 years ago

abdullah-zudioz commented 9 years ago

I got this error while upload the image

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data.

< !DOCTYPE html> < !-- release v4.2.1, copyright 2014 - 2015 Kartik Visweswaran --> < html lang="en"> < head> < meta charset="UTF-8"/> < title>Krajee JQuery Plugins - © Kartik < link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"> < link href="fileinput.css" media="all" rel="stylesheet" type="text/css" /> < script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"> < script src="fileinput.min.js" type="text/javascript"> < script src="fileinput_locale_LANG.js" type="text/javascript"> < script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" type="text/javascript"> < /head> < body> < div class="container kv-main">
< form enctype="multipart/form-data">
< input id="input-id" type="file" class="file" data-preview-file-type="text" > < /form>
< /div> < /body> < script> $("#input-id").fileinput({'showUpload':true, 'previewFileType':'any', 'uploadUrl':'http://localhost/magento/excel/image/upload/'}); < /script> < /html>

kartik-v commented 9 years ago

Duplicate to #107 and #127.