Class: Packages::Npm::PackageFileUploader

Inherits:
PackageFileUploader show all
Defined in:
app/uploaders/packages/npm/package_file_uploader.rb

Constant Summary

Constants inherited from GitlabUploader

GitlabUploader::ObjectNotReadyError, GitlabUploader::PROTECTED_METHODS

Class Method Summary collapse

Methods inherited from PackageFileUploader

#filename, #store_dir

Methods included from Workhorse::UploadPath

#workhorse_upload_path

Methods included from GcsSignedUrlMetadata

#url

Methods included from ObjectStorage::Concern

#cache!, #delete_migrated_file, #delete_tmp_file_after_storage, #direct_download_enabled?, #exclusive_lease_key, #exists?, #file_cache_storage?, #file_storage?, #filename, #filename=, #fog_attributes, #fog_credentials, #fog_directory, #fog_public, #migrate!, #object_store, #object_store=, #persist_object_store!, #persist_object_store?, #proxy_download_enabled?, #retrieve_from_store!, #store!, #store_dir, #store_dirs, #store_path, #upload_paths, #use_file, #use_open_file

Methods included from Gitlab::Utils::Override

#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!

Methods inherited from GitlabUploader

absolute_path, base_dir, #cache_dir, #cached_size, #check_remote_file_existence_on_upload?, #empty_size?, #exists?, #file_cache_storage?, file_storage?, #filename, #initialize, #local_url, #model_valid?, #move_to_cache, #move_to_store, #multi_read, #open, #options, options, #relative_path, #replace_file_without_saving!, root, storage_location, #sync_model_object_store?, #url_or_file_path, version, #work_dir

Constructor Details

This class inherits a constructor from GitlabUploader

Class Method Details

.direct_upload_enabled?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/uploaders/packages/npm/package_file_uploader.rb', line 13

def self.direct_upload_enabled?
  false
end

.workhorse_local_upload_pathObject

On Cloud Native GitLab, /srv/gitlab/public/uploads/tmp is a shared mount. Use a subpath from that directory to ensure the gitlab-workhorse and webservice containers can both access this directory.



9
10
11
# File 'app/uploaders/packages/npm/package_file_uploader.rb', line 9

def self.workhorse_local_upload_path
  Rails.root.join('public/uploads/tmp/npm_package_files').to_s
end