Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
essenciary committed May 8, 2023
2 parents 86c813c + 46aa5ba commit 57b2bb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Input.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,18 @@ function post_multipart!(request::HTTP.Request, post_data::HttpPostData, files::
fileFieldName::String = ""

for (field::String, values::Dict{String,String}) in part.headers
if field == "Content-Disposition" && getkey(values, "form-data", nothing) != nothing
if field == "Content-Disposition" && haskey(values, "form-data")

# Check to see whether this part is a file upload
# Otherwise, treat as basic POST data

if getkey(values, "filename", nothing) != nothing
if haskey(values, "filename")
if length(values["filename"]) > 0
fileFieldName = values["name"]
file.name = values["filename"]
hasFile = true
end
elseif getkey(values, "name", nothing) != nothing
elseif haskey(values, "name")
k = values["name"]
v = String(part.data)

Expand Down

0 comments on commit 57b2bb0

Please sign in to comment.