title: krajee bootstrap file input
body: <p>I'm using the plugins krajee bootstrap file input. <a href="http://plugins.krajee.com/file-input" rel="nofollow">web site</a></p>
  
  <p>I want to just send a photo to the server.
  after sending the photo to the server with ajax, the server returns me a message json.
  if the server response and success, I want to disable the button of the input file, and show only the delete button.
  how should I do?
  I tried but it does not work well.</p>
  
  <pre><code>$("#file-1").fileinput({
  uploadAsync: false,
  uploadUrl: 'o.php', 
  allowedFileExtensions : ['jpg', 'png','gif'],
  overwriteInitial: false,
  maxFileSize: 1000,
  maxFilesNum: 10,
  MAXFILECOUNT:1,
  //allowedFileTypes: ['image', 'video', 'flash'], 
  slugCallback: function(filename) {
  return filename.replace('(', '_').replace(']', '_');
  
  }
  
  }).on('fileuploaded', function(event, data, previewId, index) {
  $('#file-1').fileinput('disable');
  });
  </code></pre>