What I want to do: Have an html form, with a file input inside. When a file is chosen, the file input should upload the file, and get a file id, so when the form is submitte
For those who are looking for an answer to the question "how to check file format before uploading a file".
Actual in this case we can use optional param allowedContentTypes.
In directory boot use example code:
module.exports = function(server) {
server.dataSources.filestorage.connector.allowedContentTypes = ["image/jpg", "image/jpeg", "image/png"];
}
I hope it will help someone.