Skip to content

Commit e36e7aa

Browse files
[NOVA-2185] Support HTTP for interim files (#33)
1 parent 61cfd98 commit e36e7aa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/ffmpeg/transcoder.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ def initialize(movie, output_file, options = EncodingOptions.new, transcoder_opt
3737
if requires_pre_encode
3838
@movie.paths.each do |path|
3939
# Make the interim path folder if it doesn't exist
40-
41-
dirname = "#{TEMP_DIR}/interim#{File.dirname(path)}/"
40+
if path.start_with?("http")
41+
dirname = "#{TEMP_DIR}/interim/#{SecureRandom.urlsafe_base64}/"
42+
else
43+
dirname = "#{TEMP_DIR}/interim#{File.dirname(path)}/"
44+
end
4245
unless File.directory?(dirname)
4346
FileUtils.mkdir_p(dirname)
4447
end

0 commit comments

Comments
 (0)