Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
attachments: just match on filename, don't need Content-Type
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs committed Apr 19, 2019
1 parent 15a41fd commit b6be277
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routes/attachments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def self.registered(app)

# we have to extract filename from data -> head, since data -> filename is truncated
filename = nil
if md = params[:data][:head].match(/filename=\"(\S+)\"\r\nContent-Type/)
if md = params[:data][:head].match(/filename=\"(\S+)\"/)
filename = md[1]
else
return validation_error("filename cannot be blank")
Expand Down

0 comments on commit b6be277

Please sign in to comment.