question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot download a files containing #

See original GitHub issue
  • Version (cloudcmd -v): v5.7.0 (Dockerized version)
  • OS: Windows
  • Browser name/version: Chrome

If a file contains # in its name, drag & drop of that file to the local file explorer will fail: Browser says cannot find the file.

My guess is that # is not escaped which leads to probably other filenames other that are not working.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
machuucommented, Apr 16, 2018

Downloading a file with a hash is breaking in the latest Docker image.

I think .replace(/#/g, '%23') needs to happen when setting encodedPath in client/modules/menu.js. In fact, path doesn’t need to be encoded at all.

Here’s what I’m seeing:

  • filename is "filename_with_#"
  • .replace(/#/g, '%23') converts # -> %23
    • path="filename_with_%23"
  • encodeURI(path) converts % -> %25
    • encodedPath="filename_with_%2523"

Using the Chrome Dev Tools, I can successfully download the test file by:

  1. Pause after encodedPath is set on line menu.js:321
  2. Edit encodedPath, filename_with_%2523 -> filename_with_%23
  3. Edit path, filename_with_%23 -> filename_with_#
  4. Continue Script Execution
  5. File filename_with_# successfully downloads

I’ve sent a Pull Request with a fix that works after editing main.js in my docker container.

0reactions
coderaisercommented, Apr 17, 2018

Thank you 😃. Landed in v9.1.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't Download Anything on a Windows 10 Computer [Solved]
How to Fix “Can't Download Anything”? · Check if a large number of files are being downloaded. · Change internet option settings. ·...
Read more >
Cannot download a file from the Internet? Do this!
Cannot download a file from the Internet · 1] Check your Internet connection · 2] Clear browser cache · 3] Choose a different...
Read more >
Fix file download errors - Google Chrome Help
Fix most file download errors. If you try to download a file and it doesn't work, first try to fix the error with...
Read more >
13 Fixes to Try If You Can't Download on Windows 11
1. Check if external programs are downloading something · 2. Clear browser data · 3. Reinstall your browser · 4. Make sure you...
Read more >
Cannot download files from secure websites - Microsoft Learn
To fix this issue, first try method 1. If method 1 fails, go to method 2. ... Screenshot of the Internet Options window....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found