Fix filename extension

This commit is contained in:
Tobias Eidelpes 2021-01-09 17:29:06 +01:00
parent 2eb8f39f67
commit 9744bdcf3b

View File

@ -56,7 +56,7 @@ class DropboxService(StorageServiceInterface):
return file_bytes return file_bytes
@staticmethod @staticmethod
def move_file(identifier_from: str, identifier_to: str) -> bool: def move_file(identifier_from: str, identifier_to: str, file: bytes) -> bool:
"""Move/Rename a file on the dropbox storage. """Move/Rename a file on the dropbox storage.
:param identifier_from: Location of the file to be moved :param identifier_from: Location of the file to be moved
@ -68,7 +68,7 @@ class DropboxService(StorageServiceInterface):
dbx = dropbox.Dropbox(settings.DROPBOX_OAUTH2_ACCESS_TOKEN) dbx = dropbox.Dropbox(settings.DROPBOX_OAUTH2_ACCESS_TOKEN)
url_from = settings.DROPBOX_IMAGE_FOLDER + identifier_from + '.jpg' url_from = settings.DROPBOX_IMAGE_FOLDER + identifier_from + '.jpg'
url_to = settings.DROPBOX_IMAGE_FOLDER + identifier_to + '.jpg' url_to = settings.DROPBOX_IMAGE_FOLDER + identifier_to
try: try:
dbx.files_move_v2(url_from, url_to) dbx.files_move_v2(url_from, url_to)