Use original library file

This commit is contained in:
HaveAGitGat 2023-11-28 05:20:38 +00:00
parent 107161ebfb
commit f87bad2549
2 changed files with 17 additions and 14 deletions

View file

@ -70,7 +70,8 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
const { arr, arr_api_key } = args.inputs;
const arr_host = String(args.inputs.arr_host).trim();
const { meta } = args.inputFileObj;
const fileName = args.originalLibraryFile?.meta?.FileName || '';
const arrHost = arr_host.endsWith('/') ? arr_host.slice(0, -1) : arr_host;
const headers = {
@ -86,7 +87,7 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
const requestConfig = {
method: 'get',
url: `${arrHost}/api/v3/parse?title=${encodeURIComponent(meta?.FileName || '')}`,
url: `${arrHost}/api/v3/parse?title=${encodeURIComponent(fileName)}`,
headers,
};
@ -111,7 +112,7 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
const requestConfig = {
method: 'get',
url: `${arrHost}/api/v3/parse?title=${encodeURIComponent(meta?.FileName || '')}`,
url: `${arrHost}/api/v3/parse?title=${encodeURIComponent(fileName)}`,
headers,
};