Commit 8918d671 authored by Micaël Bergeron's avatar Micaël Bergeron

stop reusing the upload model when recording a new upload

I hope this will fix the Geo failure.
parent 54ed1882
......@@ -17,7 +17,7 @@ class Upload < ActiveRecord::Base
end
def self.record(uploader)
upload = uploader.upload || new
upload = uploader.upload&.dup || new
upload.update_attributes(
size: uploader.file.size,
......
......@@ -34,7 +34,7 @@ module Geo
#
# @return base directory where all uploads for the project are stored
def base_dir
@base_dir ||= File.join(CarrierWave.root, FileUploader.base_dir, old_full_path)
@base_dir ||= File.join(FileUploader.root, old_full_path)
end
private
......
......@@ -143,7 +143,7 @@ module Gitlab
end
def absolute_path
File.join(CarrierWave.root, path)
File.join(Gitlab.config.uploads.storage_path, path)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment