Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 234 characters in body
Source Link
Steven Moseley
  • 16.4k
  • 4
  • 43
  • 50

You need to populate your FormData() with your file data:

var formData = new FormData(); $.each($('pictureCapture')[0].files, function(key, value) { formData.append(key, value); }); 

Add change your contentType to multipart in your jQuery ajax call:

$.ajax({ ... data: formData, ... contentType: 'multipart/form-data', data: formData,  ... 

You need to populate your FormData() with your file data:

var formData = new FormData(); $.each($('pictureCapture')[0].files, function(key, value) { formData.append(key, value); }); 

Add change your contentType to multipart in your jQuery ajax call:

contentType: 'multipart/form-data', data: formData, 

You need to populate your FormData() with your file data:

var formData = new FormData(); $.each($('pictureCapture')[0].files, function(key, value) { formData.append(key, value); }); 

Add change your contentType to multipart in your jQuery ajax call:

$.ajax({ ... data: formData, ... contentType: 'multipart/form-data',   ... 
added 234 characters in body
Source Link
Steven Moseley
  • 16.4k
  • 4
  • 43
  • 50

You need to populate your FormData() with your file data:

var formData = new FormData(); $.each($('pictureCapture')[0].files, function(key, value) { formData.append(key, value); }); 

Add thischange your contentType to multipart in your jQuery ajax call:

contentType: 'multipart/form-data', data: formData,  

Add this to your jQuery ajax call:

contentType: 'multipart/form-data', 

You need to populate your FormData() with your file data:

var formData = new FormData(); $.each($('pictureCapture')[0].files, function(key, value) { formData.append(key, value); }); 

Add change your contentType to multipart in your jQuery ajax call:

contentType: 'multipart/form-data', data: formData,  
Source Link
Steven Moseley
  • 16.4k
  • 4
  • 43
  • 50

Add this to your jQuery ajax call:

contentType: 'multipart/form-data',