registerFile method

Future<FileInfoDto?> registerFile(
  1. MultipartFile? file,
  2. int? relation,
  3. bool? publish
)

Implementation

Future<FileInfoDto?> registerFile (
  MultipartFile? file,
  int? relation,
  bool? publish
) async {
  String path = "/storage/registration-file";
  Map<String, dynamic> parameters = {};
  parameters['relation'] = relation;
  parameters['publish'] = publish;
  return FileInfoDto.fromJson(
    await post(path, parameters: parameters, requireAuthorization:true) ?? {}
  );
}