Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-08-29 16:41:56 +0300
committerJames Lopez <james@jameslopez.es>2018-09-06 17:52:42 +0300
commita2aa505805478540b3150b2f9093c8658e18597d (patch)
tree7f080afe99e546f743e14c8efa5c6a30c2527554 /lib/gitlab/template_helper.rb
parenta2ea32dd44cc4a104e404325c73a77151913a946 (diff)
Refactor code to remove object storage flag from Import/Export
Updated docs, refactor import/export code Fix AvatarUploader path issue Fix project export upload webhook error
Diffstat (limited to 'lib/gitlab/template_helper.rb')
-rw-r--r--lib/gitlab/template_helper.rb17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/gitlab/template_helper.rb b/lib/gitlab/template_helper.rb
index f24a01e6cf5..fc498dde723 100644
--- a/lib/gitlab/template_helper.rb
+++ b/lib/gitlab/template_helper.rb
@@ -1,24 +1,9 @@
module Gitlab
module TemplateHelper
- include Gitlab::Utils::StrongMemoize
-
def prepare_template_environment(file)
return unless file
- if Gitlab::ImportExport.object_storage?
- params[:import_export_upload] = ImportExportUpload.new(import_file: file)
- else
- FileUtils.mkdir_p(File.dirname(import_upload_path))
- FileUtils.copy_entry(file.path, import_upload_path)
-
- params[:import_source] = import_upload_path
- end
- end
-
- def import_upload_path
- strong_memoize(:import_upload_path) do
- Gitlab::ImportExport.import_upload_path(filename: tmp_filename)
- end
+ params[:import_export_upload] = ImportExportUpload.new(import_file: file)
end
def tmp_filename