diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2018-03-23 11:07:22 +0100 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-03-27 10:32:48 +0200 |
commit | 04c5e637f827d869f8bbfb21ca41eb552c3324d6 (patch) | |
tree | 72c21a6a623dba819cfbcdd45a25d43832b27124 /app/models | |
parent | ffa73498b1c3125eec6d51db4502ab22da664773 (diff) | |
download | gitlab-ce-04c5e637f827d869f8bbfb21ca41eb552c3324d6.tar.gz |
Port LFS direct_upload from EEac/lfs-direct-upload-ee-to-ce
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/lfs_object.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/lfs_object.rb b/app/models/lfs_object.rb index 64e88d5a6a2..b7de46fa202 100644 --- a/app/models/lfs_object.rb +++ b/app/models/lfs_object.rb @@ -11,6 +11,12 @@ class LfsObject < ActiveRecord::Base mount_uploader :file, LfsObjectUploader + before_save :update_file_store + + def update_file_store + self.file_store = file.object_store + end + def project_allowed_access?(project) projects.exists?(project.lfs_storage_project.id) end |