Skip to content

Commit

Permalink
fix: ensure file stream has a string path
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed Jun 21, 2024
1 parent 2437046 commit fa5ca52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/helpers/file_stream_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module FileStreamHelper
# file_path is the path to the file to be streamed
# this will set the headers and return the content
def stream_file(file_path)
# Ensure we have a file path string
file_path = file_path.to_s
# Work out what part to return
file_size = File.size(file_path)
begin_point = 0
Expand Down

0 comments on commit fa5ca52

Please sign in to comment.