fix accepted files for customer
This commit is contained in:
parent
1ffe2ab8c6
commit
f36bf69624
@ -88,6 +88,10 @@ export default class FilesController extends ApiController {
|
||||
try {
|
||||
//get file
|
||||
if (!req.file) throw new Error("No file provided");
|
||||
if (req.file.mimetype !== "application/pdf" && req.file.mimetype !== "image/png" && req.file.mimetype !== "image/jpeg") {
|
||||
this.httpBadRequest(response, "File type not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
//init File resource with request body values
|
||||
const fileEntity = File.hydrate<File>(JSON.parse(req.body["q"]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user