0

I wanted to use this plugin (bootstrap-fileinput) to do some simple file upload. Now I'm pretty sure I removed the most to keep a simple file upload via form submit.

script type="text/javascript">
    $("#input-id").fileinput({ 'maxFileCount' : 1,'showUpload': false, 'showPreview': false, 'uploadAsync': false, 'showRemove': false, 'showClose': false, 'showCaption': false });
</script>

Still it seems to wanna upload something Asynchronously. It throws a javascript error: Error error not found undefined

Looking in the network log of chrome I see it wants to do this: Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:64251/File/UploadFile

Why does it do this? What am I forgetting? I just want to upload the file data when I click the submit button and let it then process everything by the controller. Not asynchronously and not via ajax.

Thanks for the help

Sven
  • 371
  • 1
  • 6
  • 17
  • Do you have a method named `UploadFile()` in `FileController`? –  Dec 12 '16 at 23:28
  • There is no controller with that name. The field is in a form that will send the data to the profile controller to the update profile method. Why does it call this? – Sven Dec 13 '16 at 05:03

0 Answers0