Skip to content

Commit

Permalink
fix: encoded url on get_content (#51) (#66)
Browse files Browse the repository at this point in the history
Co-authored-by: Devarsh Bhatt <[email protected]>
  • Loading branch information
agritheory and bhattdevarsh authored May 6, 2024
1 parent 1452f34 commit e5ae0f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cloud_storage/cloud_storage/overrides/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from magic import from_buffer
from PIL import UnidentifiedImageError
from werkzeug.datastructures import FileStorage
from urllib.parse import quote

FILE_URL = "/api/method/retrieve?key={path}"
URL_PREFIXES = ("http://", "https://", "/api/method/retrieve")
Expand Down Expand Up @@ -181,7 +182,7 @@ def get_content(self) -> bytes:

if self.file_url:
self.validate_file_url()
file_path = self.get_full_path()
file_path = quote(self.get_full_path())

if self.is_remote_file:
client = get_cloud_storage_client()
Expand Down

0 comments on commit e5ae0f3

Please sign in to comment.