I'm using FineUploader in my React app to upload files to Azure Blob Storage. I'm currently using validation to make sure a user can only upload one file. I now want to add two more validations:
- I want to allow only
JPGandPNGfiles - I also want to make sure that the pixel size of the file user can upload must be at least 300x300 pixels. In other words, I want to impose both width and height requirements
How do I add these validations? Do I need a validation property inside options for each requirement or do they go into the existing one? My current validation looks like this:
// Omitted for brevity
constructor(props) {
super(props);
this.uploader = new FineUploaderAzure({
options: {
cors: {
expected: true,
sendCredentials: false
},
signature: {
endpoint: "some-url.com"
},
request: {
endpoint: "my-container-url"
},
validation: {
multiple: false
}
},
callbacks: {
onError: function (id, name, errorReason, xhrOrXdr) {
}
}
})
}