I'm trying to upload a photo by using ajax.
My input:
<input type="file" name="defaultPhoto">
A part of my jQuery code.
var form = #insertCredentials
var defaultPhoto = $('#' + form + ' ' + '[name = "defaultPhoto"]').prop('files');
I'm sending defaultPhoto
through an ajax call to my php alongside with other form inputs.
The console gives back this error below:
TypeError: 'slice' called on an object that does not implement interface Blob.