Добавлена проверка наличия файла на сервере перед скачиванием fb2

This commit is contained in:
Book Pauk
2019-11-27 17:12:07 +07:00
parent f84536788b
commit eebf17c42c
2 changed files with 22 additions and 4 deletions

View File

@@ -56,7 +56,11 @@ class Reader {
}
}
async loadCachedBook(url, callback){
async checkUrl(url) {
return await axios.head(url, {headers: {'Cache-Control': 'no-cache'}});
}
async loadCachedBook(url, callback) {
const response = await axios.head(url);
let estSize = 1000000;