<back to all web services

FileUpload

The following routes are available for this service:
POST/RestApi/translations/fileupload
import 'package:servicestack/servicestack.dart';

class FileUpload implements IConvertible
{
    Uint8List? RequestStream;
    String? FileName;
    String? Connector;

    FileUpload({this.RequestStream,this.FileName,this.Connector});
    FileUpload.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        RequestStream = JsonConverters.fromJson(json['RequestStream'],'Uint8List',context!);
        FileName = json['FileName'];
        Connector = json['Connector'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'RequestStream': JsonConverters.toJson(RequestStream,'Uint8List',context!),
        'FileName': FileName,
        'Connector': Connector
    };

    getTypeName() => "FileUpload";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'www.imglobal.com', types: <String, TypeInfo> {
    'FileUpload': TypeInfo(TypeOf.Class, create:() => FileUpload()),
    'Uint8List': TypeInfo(TypeOf.Class, create:() => Uint8List(0)),
});

Dart FileUpload DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /RestApi/translations/fileupload HTTP/1.1 
Host: www.imglobal.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"FileName":"String","Connector":"String"}