const std = @import("std"); const memora = @import("memora"); const Context = memora.Context; const Storage = memora.Storage; 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)); }