Skip to content

Commit

Permalink
Use url_encoded_filename method
Browse files Browse the repository at this point in the history
  • Loading branch information
aapomm committed Jun 25, 2024
1 parent f44129c commit 33256b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/concerns/attachments_copier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def copy_attachments(record)

if attachment
new_attachment = attachment.copy_to(record.node)
new_filename = ERB::Util.url_encode(new_attachment.filename)
new_filename = new_attachment.url_encoded_filename
new_path = full_screenshot_path.gsub(
/nodes\/[0-9]+\/attachments\/.+/,
"nodes/#{new_attachment.node_id}/attachments/#{new_filename}"
Expand Down

0 comments on commit 33256b5

Please sign in to comment.