Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
hopefully fix issues with empty extension
Browse files Browse the repository at this point in the history
  • Loading branch information
watzon committed Jan 14, 2024
1 parent ecc11e4 commit c4fc33a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controllers/paste_controller.cr
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ module Paste69

if form.has_key?("file")
_filename, body = form["file"]
_, filename = form["filename"] || {nil, _filename}
_, filename = form["filename"] || {nil, nil}
filename = filename ? String.new(filename) : nil

@utils.store_file(
body,
content_type,
Expand Down

0 comments on commit c4fc33a

Please sign in to comment.