diff --git a/JlSonic/api.jl b/JlSonic/api.jl index 1be741c..c8e778f 100644 --- a/JlSonic/api.jl +++ b/JlSonic/api.jl @@ -520,7 +520,7 @@ function giveconverted(file, bitrate, format) mime = suffix in keys(Mux.mimetypes) ? Mux.mimetypes[suffix] : suffix headers["Content-Type"] = mime # headers["Content-Length"] = string(length(data)) - return Dict(:body => read(iodata), :headers => headers) + return Dict(:body => take!(iodata), :headers => headers) end function convert(infile; bitrate = 64, format = "oga")