Escape the #
symbol in urls with an encoded pound symbol (%23
). In your case, http://localhost:8000/api/v1/open/?name=/ficheiro%23.txt
.
The #
character is a special character, called a named anchor, that isn't passed to the server by the browser. In your case (assuming everything else works fine), the browser is requesting the file "/ficheiro", not "/ficheiro#.txt"