mirror of
https://github.com/sergeyyarkov/educt-server.git
synced 2026-10-11 02:09:07 +03:00
16 lines
380 B
TypeScript
16 lines
380 B
TypeScript
import { schema } from '@ioc:Adonis/Core/Validator';
|
|
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext';
|
|
|
|
export default class CreateImageValidator {
|
|
constructor(protected ctx: HttpContextContract) {}
|
|
|
|
public schema = schema.create({
|
|
image: schema.file({
|
|
size: '10mb',
|
|
extnames: ['jpg', 'jpeg', 'png'],
|
|
}),
|
|
});
|
|
|
|
public messages = {};
|
|
}
|