const std = @import("std");
pub const FileAccessType = enum {
Public,
Team,
Private,
};
pub const FileSystemFile = struct {
id: i32 = 0,
fileName: ?[]const u8 = null,
filePath: ?[]const u8 = null,
contentType: ?[]const u8 = null,
contentLength: i64 = 0,
// @References(typeof(FileSystemItem))
fileSystemItemId: i32 = 0,
};
pub const FileSystemItem = struct {
id: i32 = 0,
fileAccessType: ?FileAccessType = null,
file: ?FileSystemFile = null,
appUserId: ?[]const u8 = null,
};
pub const CreateFileSystemItem = struct {
fileAccessType: ?FileAccessType = null,
file: ?FileSystemFile = null,
};
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsonl/reply/CreateFileSystemItem HTTP/1.1
Host: blazor-gallery.servicestack.net
Accept: text/jsonl
Content-Type: text/jsonl
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/jsonl
Content-Length: length
{"id":0,"fileAccessType":"Public","file":{"id":0,"fileName":"String","filePath":"String","contentType":"String","contentLength":0,"fileSystemItemId":0},"appUserId":"String"}