mirror of
https://github.com/zigzap/zap.git
synced 2025-10-21 15:44:10 +00:00
format httpparambinaryfile
This commit is contained in:
parent
8845afaf33
commit
0f6beb4347
1 changed files with 6 additions and 0 deletions
|
@ -590,6 +590,12 @@ pub const HttpParamBinaryFile = struct {
|
||||||
mimetype: ?[]const u8 = null,
|
mimetype: ?[]const u8 = null,
|
||||||
/// filename
|
/// filename
|
||||||
filename: ?[]const u8 = null,
|
filename: ?[]const u8 = null,
|
||||||
|
pub fn format(value: @This(), comptime _: []const u8, _: std.fmt.FormatOptions, writer: anytype) std.os.WriteError!void {
|
||||||
|
const d = value.data orelse "\\0";
|
||||||
|
const m = value.mimetype orelse "null";
|
||||||
|
const f = value.filename orelse "null";
|
||||||
|
return writer.print("<{s} ({s}): {any}>", .{ f, m, d });
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn Fiobj2HttpParam(o: fio.FIOBJ, a: std.mem.Allocator, dupe_string: bool) !?HttpParam {
|
pub fn Fiobj2HttpParam(o: fio.FIOBJ, a: std.mem.Allocator, dupe_string: bool) !?HttpParam {
|
||||||
|
|
Loading…
Add table
Reference in a new issue