2018-10-22 07:00:50 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-07-20 23:25:10 +00:00
|
|
|
module Gitlab
|
|
|
|
module TemplateHelper
|
2018-07-26 10:55:21 +00:00
|
|
|
def prepare_template_environment(file)
|
2018-08-03 11:07:50 +00:00
|
|
|
return unless file
|
2018-07-20 23:25:10 +00:00
|
|
|
|
2018-08-29 13:41:56 +00:00
|
|
|
params[:import_export_upload] = ImportExportUpload.new(import_file: file)
|
2018-07-20 23:25:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def tmp_filename
|
|
|
|
SecureRandom.hex
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|