Allow binary files to be downloaded
This commit is contained in:
@ -76,7 +76,7 @@ class SubmissionsController < ApplicationController
|
|||||||
stringio = Zip::OutputStream.write_buffer do |zio|
|
stringio = Zip::OutputStream.write_buffer do |zio|
|
||||||
@files.each do |file|
|
@files.each do |file|
|
||||||
zio.put_next_entry(file.path.to_s == '' ? file.name_with_extension : File.join(file.path, file.name_with_extension))
|
zio.put_next_entry(file.path.to_s == '' ? file.name_with_extension : File.join(file.path, file.name_with_extension))
|
||||||
zio.write(file.content)
|
zio.write(file.content.present? ? file.content : file.native_file.read)
|
||||||
end
|
end
|
||||||
|
|
||||||
# zip exercise description
|
# zip exercise description
|
||||||
|
Reference in New Issue
Block a user