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
trying to save overly long URL as file results in "filename too long error" with firefox unable to "re-download" that file in downloads window either
ex.: https://cdn4.telesco.pe/file/d1aXFQbScE4e02KRUEwy5j6nJkJd3-8yO1oZQ6B6wppIdosdKQ5SK5b0d0ln7rPEKhcbNcah8qs_1SLu8ASZ9nUpVVzCtFPRwfHVxC2xfl_Nk9u-Nzw6TRVZLIP0GrK4frlnE5RaNzOKbX6du186Wrlh5N7r-rI-A5OFDd51iQ3-T8pFH0UXO7AvvFestCixkJF-aAhGBkA5BF_q9wtJCTnYq-OExlkJOM79pCyyRj9rkq4fFB2Xt17rfc4AClgDSlowqkNU6TNhmbcrCziTD8Ua2HFaWdO8EDFG5dbEq8Wm8nvxrPX9kTeVQKqEg1lz5l_xTSRmhW2zpCd7HVJd9g.jpg — 347 chars incl the file extension
(via https://t.me/alphynarium/304, so it's a real use-case)
which is still a valid length of a filename within an URL, but not on the most filesystems.
not sure if it's global firefox's of ever OS level issue tbh, but until lower levels of abstraction fix that,
it should prob be addressed on the userspace level
for example special characters in URLs are already getting auto-replaced,
so overly-long filenames should be truncated to a reasonable 128 chars?
or replaced with some UUID, and have additional text file with origin filename as the contents
Your System
Operating system: Ubuntu
Firefox version: 97
Gesturefy version: 3.2.4
The text was updated successfully, but these errors were encountered:
I would like to solve this by catching the error and then re-trigger the download with a shortened file name. However currently I'm not able to properly catch the error, even though the documentation claims it's possible.
The reason why I don't want to just always shorten the filename is that I want to use as much Firefox default behaviour as possible. Currently I leave the naming of the file entirely to Firefox.
Another option would be to extract the potential filename from the URL, check if its length exceeds a certain amount and then shorten the file name.
What error message do you get in the browser console? Because I'm getting OperationError: Could not remove the file at ...SpDkktUUvQ.jpg.part and OperationError: Could not remove the file at ... SpDkktUUvQ.jpg Which feels like Firefox itself doesn't even catch the error properly.
To give an update about the current state of the issue:
While there seems to exist some simple solutions like: extracting the file name from the URL or pre-querying the file, both of them have some drawbacks for the entire file-downloading and -naming implementation. Option one won't be able to get file names provided by the Content-Disposition header. Option two either introduces redundant requests, or lacks download progress feedback in the UI (if the entire file is downloaded via JavaScript and then passed as a blob to the download API)
Describe your matter in detail
trying to save overly long URL as file results in "filename too long error" with firefox unable to "re-download" that file in downloads window either
ex.:
https://cdn4.telesco.pe/file/d1aXFQbScE4e02KRUEwy5j6nJkJd3-8yO1oZQ6B6wppIdosdKQ5SK5b0d0ln7rPEKhcbNcah8qs_1SLu8ASZ9nUpVVzCtFPRwfHVxC2xfl_Nk9u-Nzw6TRVZLIP0GrK4frlnE5RaNzOKbX6du186Wrlh5N7r-rI-A5OFDd51iQ3-T8pFH0UXO7AvvFestCixkJF-aAhGBkA5BF_q9wtJCTnYq-OExlkJOM79pCyyRj9rkq4fFB2Xt17rfc4AClgDSlowqkNU6TNhmbcrCziTD8Ua2HFaWdO8EDFG5dbEq8Wm8nvxrPX9kTeVQKqEg1lz5l_xTSRmhW2zpCd7HVJd9g.jpg
— 347 chars incl the file extension(via
https://t.me/alphynarium/304
, so it's a real use-case)which is still a valid length of a filename within an URL, but not on the most filesystems.
not sure if it's global firefox's of ever OS level issue tbh, but until lower levels of abstraction fix that,
it should prob be addressed on the userspace level
for example special characters in URLs are already getting auto-replaced,
so overly-long filenames should be truncated to a reasonable 128 chars?
or replaced with some UUID, and have additional text file with origin filename as the contents
Your System
The text was updated successfully, but these errors were encountered: