MyApp

<back to all web services

CreateFileSystemItem

Files
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports MyApp.ServiceModel

Namespace Global

    Namespace MyApp.ServiceModel

        Public Partial Class CreateFileSystemItem
            Implements ICreateDb(Of FileSystemItem)
            Implements IFileItem
            Public Overridable Property FileAccessType As Nullable(Of FileAccessType)
            Public Overridable Property File As FileSystemFile
        End Class

        Public Enum FileAccessType
            Public
            Team
            Private
        End Enum

        Public Partial Class FileSystemFile
            Implements IFile
            Public Overridable Property Id As Integer
            Public Overridable Property FileName As String
            Public Overridable Property FilePath As String
            Public Overridable Property ContentType As String
            Public Overridable Property ContentLength As Long
            <References(GetType(FileSystemItem))>
            Public Overridable Property FileSystemItemId As Integer
        End Class

        Public Partial Class FileSystemItem
            Implements IFileItem
            Public Overridable Property Id As Integer
            Public Overridable Property FileAccessType As Nullable(Of FileAccessType)
            Public Overridable Property File As FileSystemFile
            Public Overridable Property AppUserId As String
        End Class
    End Namespace
End Namespace

VB.NET CreateFileSystemItem DTOs

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

HTTP + CSV

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

POST /csv/reply/CreateFileSystemItem HTTP/1.1 
Host: blazor-gallery.servicestack.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"fileAccessType":"Public","file":{"id":0,"fileName":"String","filePath":"String","contentType":"String","contentLength":0,"fileSystemItemId":0}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"id":0,"fileAccessType":"Public","file":{"id":0,"fileName":"String","filePath":"String","contentType":"String","contentLength":0,"fileSystemItemId":0},"appUserId":"String"}