aboutsummaryrefslogtreecommitdiff
path: root/src/server/DashUploadUtils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-04-23 16:20:08 -0400
committerbobzel <zzzman@gmail.com>2024-04-23 16:20:08 -0400
commit9e809f8748d1812bb03ec6471aa6f97467f8f75a (patch)
tree6657f2290e1c1a10456a32d2e1462981f461c8d0 /src/server/DashUploadUtils.ts
parent939e18624af4252551f38c43335ee8ef0acd144c (diff)
fixes for rich text menu updates and setting parameters on text doc vs within in RTF. Lots of lint cleanup.
Diffstat (limited to 'src/server/DashUploadUtils.ts')
-rw-r--r--src/server/DashUploadUtils.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/DashUploadUtils.ts b/src/server/DashUploadUtils.ts
index 3d8325da9..08cea1de5 100644
--- a/src/server/DashUploadUtils.ts
+++ b/src/server/DashUploadUtils.ts
@@ -186,8 +186,8 @@ export namespace DashUploadUtils {
const image = await request.get(source, { encoding: null });
const { /* data, */ error } = await new Promise<{ data: any; error: any }>(resolve => {
// eslint-disable-next-line no-new
- new ExifImage({ image }, (error, data) => {
- const reason = (error as any)?.code;
+ new ExifImage({ image }, (exifError, data) => {
+ const reason = (exifError as any)?.code;
resolve({ data, error: reason });
});
});
@@ -506,8 +506,8 @@ export namespace DashUploadUtils {
if (fExists(fileKey, Directory.pdfs) && fExists(textFilename, Directory.text)) {
fs.unlink(file.filepath, () => {});
return new Promise<Upload.FileResponse>(res => {
- const textFilename = `${fileKey.substring(0, fileKey.length - 4)}.txt`;
- const readStream = createReadStream(serverPathToFile(Directory.text, textFilename));
+ const pdfTextFilename = `${fileKey.substring(0, fileKey.length - 4)}.txt`;
+ const readStream = createReadStream(serverPathToFile(Directory.text, pdfTextFilename));
let rawText = '';
readStream
.on('data', chunk => {