фиксим
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-05-07 21:18:11 +10:00
parent c19ec3b232
commit 148518d1ef

View File

@@ -212,6 +212,8 @@ const bilutene_b = async () => {
const download = async () => { const download = async () => {
try { try {
// Обрезаем заголовок до 200 символов для совместимости с именем файла на сервере
const truncatedTitle = props.title.slice(0, 200);
const rez = await axios.get( const rez = await axios.get(
"https://allowlgroup.ru/api/8001/file_download", "https://allowlgroup.ru/api/8001/file_download",
// "http://127.0.0.1:8001/file_download", // "http://127.0.0.1:8001/file_download",
@@ -219,7 +221,7 @@ const download = async () => {
params: { params: {
// path: props.parsed_at.split(" ")[0].replace("-", "/"), // path: props.parsed_at.split(" ")[0].replace("-", "/"),
path: props.article_date.split(" ")[0], path: props.article_date.split(" ")[0],
title: props.title, title: truncatedTitle,
}, },
responseType: "blob", responseType: "blob",
}, },
@@ -230,7 +232,7 @@ const download = async () => {
}), }),
); );
const link = document.createElement("a"); const link = document.createElement("a");
let filename = props.title + ".docx"; let filename = truncatedTitle + ".docx";
try { try {
const disposition = rez.headers?.["content-disposition"]; const disposition = rez.headers?.["content-disposition"];
if (disposition) { if (disposition) {