Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

187
Visualizações
Django Specific Request URL fails after working properly on a localhost

I have been working on a Django python application which I recently published to a public domain. Beforehand, I had tested my code, including a bit of code which records a user's signature after they draw it on a canvas, sends the signature to the server through the URL encoded in base64, and decodes it on the otherside.

After publishing, I am having some trouble sending this long encoded base64 URL. First, I overcame the Apache2 issue 'Request URI Too Long' by editing my apache2.conf:

AccessFileName .htaccess
LimitRequestLine 50000

Now I simply get '404 Not Found - The request URL was not found on the server'. The URL should be fine, in fact, it finds the URL just fine when I delete some of the length at the end of the URL. Of course, it can then no longer decode the URL. As you can see from my Django error log, there is no POST or GET request, although I am POSTing the code from a form on the page. I feel that this might be the underlying issue. I tried using javascript to POST as shown here.

<form action="/UserDashboard/SaveSignature/" id="FormSignature" method="POST" style="width: 60%; margin-left: 20%; margin-right: 20%; height: 60%;">
    <input type="submit" value="Save Signature" style="background-color: whitesmoke; width: 40%; margin-left: 30%; margin-right: 30%; height: 28%; margin-top: 10%;"/>
</form>   

    $("#ChangeSignature").click(function() {
    var canvas = document.querySelector("canvas");
    var signaturePad = new SignaturePad(canvas, {
        minWidth: 5,
        maxWidth: 10,
        penColor: "rgb(0, 0, 0)",
        onEnd: function() {
            changeLink(signaturePad.toDataURL());
        }
    });
});

404 Not Found

Django error log

EDIT: I would like to add that my Django urls.py path uses a path variable for 'dataURL', therefore any forward-slashes in the link should not affect what django interprets as the dataURL variable coming at the end of the link.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda