I have an array of composite objects as follows:
{file: File(871699), x: 0, y: 0, width: 2, height: 2, …}
Each vector house has an element as described above, and the first parameter, the file is an image that has the following data:
file:File(871699) {name: "tumblr_lxjy8kfFeQ1qh59n0o1_500.gif", lastModified: 1518121346035, lastModifiedDate: Thu Feb 08 2018 18:22:26 GMT-0200 (-02), webkitRelativePath: "", size: 871699, …}
I'd like to pass this array through an ajax call, but I can not. My code is this:
function uploadFiles(formData) {
$.ajax({
url: '/admin/foto',
type: 'POST',
data: arrayObj,
contentType: false,
success: () => {
console.log("Sucesso!!");
}
});
}
And on the server I get as follows:
application.post('/admin/foto', (req, res) => {
application.controllers.admin.albums.uploadFotos(application, req, res);
});