2
When I go up the site gives me that mistake:
GET http://localhost:3000/locale/locale.properties 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 http://localhost:3000/locale/locale.properties not found.
It turns out that the file
locale/locale.properties
I have in my project and do not know why the mistake:
Not Found(404)
These files I downloaded from PDF.js, suggested by a colleague in another post. What I bass works, but when I add in my project then it gives this error. I’m trying to see some dependency that I didn’t put in, but apparently it’s all OK (of course it’s not), but I can’t see where the problem is. If someone uses or already used PDF.js and can give me a help, I appreciate it. I don’t know if it is some configuration in IIS, anyway, 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();
}
}