mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 08:34:39 +08:00
e4350bb966
This PR introduces a new `enable_experimental_backup_uploads` site setting (default false and hidden), which when enabled alongside `enable_direct_s3_uploads` will allow for direct S3 multipart uploads of backup .tar.gz files. To make multipart external uploads work with both the S3BackupStore and the S3Store, I've had to move several methods out of S3Store and into S3Helper, including: * presigned_url * create_multipart * abort_multipart * complete_multipart * presign_multipart_part * list_multipart_parts Then, S3Store and S3BackupStore either delegate directly to S3Helper or have their own special methods to call S3Helper for these methods. FileStore.temporary_upload_path has also removed its dependence on upload_path, and can now be used interchangeably between the stores. A similar change was made in the frontend as well, moving the multipart related JS code out of ComposerUppyUpload and into a mixin of its own, so it can also be used by UppyUploadMixin. Some changes to ExternalUploadManager had to be made here as well. The backup direct uploads do not need an Upload record made for them in the database, so they can be moved to their final S3 resting place when completing the multipart upload. This changeset is not perfect; it introduces some special cases in UploadController to handle backups that was previously in BackupController, because UploadController is where the multipart routes are located. A subsequent pull request will pull these routes into a module or some other sharing pattern, along with hooks, so the backup controller and the upload controller (and any future controllers that may need them) can include these routes in a nicer way. |
||
---|---|---|
.. | ||
allowed_pm_users.rb | ||
api_key_fabricator.rb | ||
badge_fabricator.rb | ||
bookmark_fabricator.rb | ||
category_fabricator.rb | ||
category_group_fabricator.rb | ||
color_scheme_color_fabricator.rb | ||
color_scheme_fabricator.rb | ||
dimissed_topic_user.rb | ||
do_not_disturb_fabricator.rb | ||
email_change_request_fabricator.rb | ||
email_log_fabricator.rb | ||
email_token_fabricator.rb | ||
embeddable_host_fabricator.rb | ||
external_upload_stub_fabricator.rb | ||
flag_fabricator.rb | ||
group_fabricator.rb | ||
group_history_fabricator.rb | ||
group_request_fabricator.rb | ||
group_user_fabricator.rb | ||
ignored_user_fabricator.rb | ||
incoming_email_fabricator.rb | ||
incoming_link_fabricator.rb | ||
invite_fabricator.rb | ||
invited_user_fabricator.rb | ||
like_fabricator.rb | ||
muted_user.rb | ||
notification_fabricator.rb | ||
optimized_image_fabricator.rb | ||
permalink_fabricator.rb | ||
post_action_fabricator.rb | ||
post_custom_field_fabricator.rb | ||
post_detail_fabricator.rb | ||
post_fabricator.rb | ||
post_reply_key_fabricator.rb | ||
post_revision_fabricator.rb | ||
published_page_fabricator.rb | ||
reviewable_claimed_topic_fabricator.rb | ||
reviewable_fabricator.rb | ||
screened_email_fabricator.rb | ||
screened_ip_address_fabricator.rb | ||
screened_url_fabricator.rb | ||
search_log_fabricator.rb | ||
shared_draft_fabricator.rb | ||
single_sign_on_record_fabricator.rb | ||
skipped_email_log_fabricator.rb | ||
tag_fabricator.rb | ||
tag_group_fabricator.rb | ||
theme_fabricator.rb | ||
theme_field_fabricator.rb | ||
topic_allowed_group_fabricator.rb | ||
topic_allowed_user_fabricator.rb | ||
topic_embed_fabricator.rb | ||
topic_fabricator.rb | ||
topic_tag_fabricator.rb | ||
topic_timer_fabricator.rb | ||
topic_user_fabricator.rb | ||
upload_fabricator.rb | ||
user_action_fabricator.rb | ||
user_api_key_fabricator.rb | ||
user_avatar_fabricator.rb | ||
user_email_fabricator.rb | ||
user_fabricator.rb | ||
user_field_fabricator.rb | ||
user_field_option_fabricator.rb.rb | ||
user_option_fabricator.rb | ||
user_profile_fabricator.rb | ||
user_second_factor_fabricator.rb | ||
user_security_key_fabricator.rb | ||
watched_word_fabricator.rb | ||
web_crawler_request_fabricator.rb | ||
web_hook_fabricator.rb |