Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

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

  • 1 отговор
  • 1 има този проблем
  • 1 изглед
  • Последен отговор от 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>

Променено на от cor-el

Всички отговори (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?