const std = @import("std"); const Context = @import("../../context.zig"); const Storage = @import("../../../storage/root.zig"); pub const access = .users; pub fn get(ctx: *Context) ![]const u8 { const id = ctx.request.head.target["/api/image/load/".len..]; var image = Storage.Image { .id = id }; var file = try image.file(ctx.storage); defer file.close(); return try file.readToEndAlloc(ctx.allocator, std.math.maxInt(usize)); }