fix: use file name for backups to Google Drive (#19504)

Currently, backups to Google Drive are uploaded with the absolute path as the filenames. This fix changes that.

[skip ci]
This commit is contained in:
Gughan Ravikumar 2023-01-06 17:06:51 +05:30 committed by GitHub
parent 6bae5a2974
commit 4654db6e26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,7 +169,7 @@ def upload_system_backup_to_google_drive():
if not fileurl:
continue
file_metadata = {"name": fileurl, "parents": [account.backup_folder_id]}
file_metadata = {"name": os.path.basename(fileurl), "parents": [account.backup_folder_id]}
try:
media = MediaFileUpload(