webdav4 icon indicating copy to clipboard operation
webdav4 copied to clipboard

Cant able to get/download file which having # symbol in filepath

Open Amerbaig92 opened this issue 1 year ago • 1 comments

code:

import webdav4 from webdav4.client import Client from webdav4.fsspec import WebdavFileSystem import httpx

timeout=httpx.Timeout(506060) client = Client("https://sddsaturn.ondemand.sas.com", auth=("USER", "PWD"),timeout=timeout)

try:

with io.BytesIO() as stream:
	client.download_fileobj(source_folder_path, stream)
	stream.seek(0)
	

except Exception as e: print(f"Failed to Get/Download file to: {stream} because {e}") logging.error(f"Failed to Get/Download file to: {stream} because {e}")

NEED HELP TO GET/DOWNLOAD FILES WITH # SYMBOL

Amerbaig92 avatar Aug 26 '24 12:08 Amerbaig92

You can format your code with triple backticks in Github Markdown to make it more readable.

But based on the issue title, I assume that you are running into an issue similar to the one I have and need to quote that symbol, i.e., replace # with urllib.parse.quote('#'), which results in %23.

mxmlnkn avatar Oct 12 '24 14:10 mxmlnkn