Test

<back to all web services

TestFileUploads

using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Test.ServiceModel;

namespace Test.ServiceModel
{
    public partial class TestFileUploads
    {
        public virtual int? Id { get; set; }
        public virtual string RefId { get; set; }
    }

    public partial class TestFileUploadsResponse
    {
        public virtual int? Id { get; set; }
        public virtual string RefId { get; set; }
        public virtual List<UploadInfo> Files { get; set; } = [];
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

    public partial class UploadInfo
    {
        public virtual string Name { get; set; }
        public virtual string FileName { get; set; }
        public virtual long ContentLength { get; set; }
        public virtual string ContentType { get; set; }
    }

}

C# TestFileUploads 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 /jsonl/reply/TestFileUploads HTTP/1.1 
Host: test.servicestack.net 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":0,"refId":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id":0,"refId":"String","files":[{"name":"String","fileName":"String","contentLength":0,"contentType":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}