You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the method download_attachments_from_page() raises an exception when the filename is not sanitize
Eg: image2019-9-13 11:51:31.png this file raises an error, I believe that is caused by the colons (:)
The text was updated successfully, but these errors were encountered:
I think that it is not related to the client. Looking into the code I found this in atlassian/confluence.py:
for attachment in attachments:
file_name = attachment["title"]
if not file_name:
file_name = attachment["id"] # if the attachment has no title, use attachment_id as a filename
Line 1338, in the download_attachments_from_page() definition.
In the code the file name is used exactly as it is defined in Confluence, but some special characters (like colons) can cause an error in the filesystem. I have used a regexp in my local package to sanitize the file name and it seem to solve the problem
On macOS host, it seems to be fine. Are you using a Windows host? According to https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file, a colon shouldn't be used for files or directory names. Therefore, I don't think the problem is with the library code. I can add a small comment to the code with a warning.
Hi!
Using the method download_attachments_from_page() raises an exception when the filename is not sanitize
Eg:
image2019-9-13 11:51:31.png
this file raises an error, I believe that is caused by the colons (:)The text was updated successfully, but these errors were encountered: