blob: 7cd5cf1787f6ff6e4ce53f15bd7d0997dcf20f0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
const std = @import("std");
const Context = @import("../../context.zig");
const Storage = @import("../../../storage/root.zig");
const log = std.log.scoped(.image_upload);
pub const access = .everyone;
pub fn post(ctx: *Context) !void {
if (ctx.request.head.content_length) |length| {
var buffer: [1024]u8 = undefined;
const reader = try ctx.request.readerExpectContinue(&buffer);
try Storage.Image.new(ctx.storage, reader, length);
}
}
|