Skip to content

Commit

Permalink
Improve truncate uri path method
Browse files Browse the repository at this point in the history
  • Loading branch information
igordepolli committed Jul 8, 2024
1 parent 71a0b91 commit 5a0eb7b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/vitals_image/analyzer/url_analyzer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def download
end

def truncate_uri_path(uri_path)
filename, extension = uri_path.split(".")
filename = filename[0..200]
parts = uri_path.split(".")
filename = parts.first[0..200]
extension = parts.last

[filename, extension].join(".")
end
Expand Down

0 comments on commit 5a0eb7b

Please # to comment.