Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Pesquisar no apoio

Evite burlas no apoio. Nunca iremos solicitar que telefone ou envie uma mensagem de texto para um número de telefone ou que partilhe informações pessoais. Por favor, reporte atividades suspeitas utilizando a opção "Reportar abuso".

Learn More

firefox gives 500 internal server error when i upload a javascript file with .js extention the same code works in Chrome

  • 1 resposta
  • 1 tem este problema
  • 1 visualização
  • Última resposta por cor-el

more options

hi love, i was surprised to see this and lack of my knowledge brought me here. below is my code

HTML

  <form id="form" name="form" action="http://123.21.111.51:8081/v1/AUTH_beta27/peter/" method="POST" enctype="multipart/form-data">
           <input type="file" id="fileToUpload" name="fileToUpload" />
           <input type="hidden" id="auth" name="auth" value="AUTH_tk7f679e48c7074a06bf28ca3a999f3dda" />
           <input type="hidden" id="fileSize" name="fileSize" value="" />
       </form>
         <p>
            <input type="button" value="Upload" onclick="upload_files()" />
        </p>

JAVASCRIPT:
function upload_files() {

    var file = document.getElementById('fileToUpload');
    fileName = file.files.item(0).name;
    fileSize = file.files.item(0).size;


    var fm = document.getElementById("form");

    var action = 'http://123.21.111.51:8081/v1/AUTH_beta27/peter/' + fileName;

    console.log('action = ' + action);


    document.getElementById('form').action = action;

    document.getElementById('fileSize').value = fileSize;

    fm.submit();

}
hi love, i was surprised to see this and lack of my knowledge brought me here. below is my code HTML <pre><nowiki> <form id="form" name="form" action="http://123.21.111.51:8081/v1/AUTH_beta27/peter/" method="POST" enctype="multipart/form-data"> <input type="file" id="fileToUpload" name="fileToUpload" /> <input type="hidden" id="auth" name="auth" value="AUTH_tk7f679e48c7074a06bf28ca3a999f3dda" /> <input type="hidden" id="fileSize" name="fileSize" value="" /> </form> <p> <input type="button" value="Upload" onclick="upload_files()" /> </p> JAVASCRIPT: function upload_files() { var file = document.getElementById('fileToUpload'); fileName = file.files.item(0).name; fileSize = file.files.item(0).size; var fm = document.getElementById("form"); var action = 'http://123.21.111.51:8081/v1/AUTH_beta27/peter/' + fileName; console.log('action = ' + action); document.getElementById('form').action = action; document.getElementById('fileSize').value = fileSize; fm.submit(); }</nowiki></pre>

Modificado por cor-el a

Todas as respostas (1)

more options

Which security software (firewall, anti-virus) do you have?

Did you make sure that your firewall or anti-virus software isn't blocking such uploaded content?