убрано ограничение по длине названия
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -213,7 +213,7 @@ const bilutene_b = async () => {
|
|||||||
const download = async () => {
|
const download = async () => {
|
||||||
try {
|
try {
|
||||||
// Обрезаем заголовок до 200 символов для совместимости с именем файла на сервере
|
// Обрезаем заголовок до 200 символов для совместимости с именем файла на сервере
|
||||||
const truncatedTitle = props.title.slice(0, 100);
|
// const truncatedTitle = props.title.slice(0, 100);
|
||||||
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",
|
||||||
@@ -221,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: truncatedTitle,
|
title: props.title,
|
||||||
},
|
},
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
},
|
},
|
||||||
@@ -232,7 +232,7 @@ const download = async () => {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
let filename = truncatedTitle + ".docx";
|
let filename = props.title + ".docx";
|
||||||
try {
|
try {
|
||||||
const disposition = rez.headers?.["content-disposition"];
|
const disposition = rez.headers?.["content-disposition"];
|
||||||
if (disposition) {
|
if (disposition) {
|
||||||
|
|||||||
Reference in New Issue
Block a user