From fa5ca52b1e2470fbb2537e15259f30946b1e8a54 Mon Sep 17 00:00:00 2001 From: Andrew Cain Date: Fri, 21 Jun 2024 21:52:19 +1000 Subject: [PATCH] fix: ensure file stream has a string path --- app/helpers/file_stream_helper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/helpers/file_stream_helper.rb b/app/helpers/file_stream_helper.rb index 4d2c84e65..6859954d6 100644 --- a/app/helpers/file_stream_helper.rb +++ b/app/helpers/file_stream_helper.rb @@ -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