Uploading site gives error of: failure to load a file

2

When I upload the site gives me this error:

  

GET link 404 (Not   Found) xhrLoadText
  @ l10n.js: 128parseResource
  @ l10n.js: 257L10nResourceLink.load
  @ l10n.js: 350loadLocale
  @ l10n.js: 363document.webL10n.undefined.setLanguage
  @ l10n.js: 997webViewerInitialized
  @ viewer.js: 7081 l10n.js: 351    link not found.

It turns out that the file

  

locale / locale.properties

I have in my project and I do not know why the error:

  

Not Found (404)

These files I downloaded from PDF.js, suggested by a colleague in another post. What I do below works, but when I add in my project then it gives this error. I'm trying to see some dependency that I did not put, but apparently everything is OK (of course it is not), but I can not see where the problem is. If someone uses or has already used PDF.js and can help me, I appreciate it. I do not know if it is some configuration in IIS, I'm not sure what to do.

This is the js function that gives this error:

function xhrLoadText(url, onSuccess, onFailure) {
    onSuccess = onSuccess || function _onSuccess(data) {};
    onFailure = onFailure || function _onFailure() {
      console.warn(url + ' not found.');
    };

    var xhr = new XMLHttpRequest();
    xhr.open('GET', url, gAsyncResourceLoading);
    if (xhr.overrideMimeType) {
      xhr.overrideMimeType('text/plain; charset=utf-8');
    }
    xhr.onreadystatechange = function() {
      if (xhr.readyState == 4) {
        if (xhr.status == 200 || xhr.status === 0) {
          onSuccess(xhr.responseText);
        } else {
          onFailure();
        }
      }
    };
    xhr.onerror = onFailure;
    xhr.ontimeout = onFailure;

    // in Firefox OS with the app:// protocol, trying to XHR a non-existing
    // URL will raise an exception here -- hence this ugly try...catch.
    try {
      xhr.send(null); **//Aqui dá o erro**
    } catch (e) {
      onFailure();
    }
  }
    
asked by anonymous 26.10.2015 / 17:18

1 answer

2

The Mime Type of the locale.properties was missing. I made text / plain for .properties and did not give the error any more. It does not show the PDF, but that will be another post if I do not resolve it.

    
26.10.2015 / 19:18