Hello, I’m trying to upload an image to my server. I can do with if I create an object and use the .save() methods but I want to do it through cloud code to make it secure but I get the following error:
this code is run when the user selected an image
fileChangeEvent(input:any){
var file = input.target.files[0];
var name = file.name; //This does *NOT* need to be a unique name
this.thumbnailImageFile = new Parse.File(name, file);
}
and when the user pressed submit:
const params = {
title: this.form.title.value,
lat: this.getNewArtLat(),
lng: this.getNewArtLng(),
thumbnail:this.thumbnailImageFile
};
const response = await Parse.Cloud.run("addArt", params);
Thanks for taking the time