changed readable format to json
This commit is contained in:
@@ -12,7 +12,8 @@ type ReturnContentTypes =
|
||||
| "text/plain"
|
||||
| "image/jpeg"
|
||||
| "image/png"
|
||||
| "application/pdf";
|
||||
| "application/pdf"
|
||||
| "application/json";
|
||||
|
||||
export default async function readFile(filePath: string) {
|
||||
let contentType: ReturnContentTypes;
|
||||
@@ -58,8 +59,8 @@ export default async function readFile(filePath: string) {
|
||||
contentType = "application/pdf";
|
||||
} else if (filePath.endsWith(".png")) {
|
||||
contentType = "image/png";
|
||||
} else if (filePath.endsWith("_readability.txt")) {
|
||||
contentType = "text/plain";
|
||||
} else if (filePath.endsWith("_readability.json")) {
|
||||
contentType = "application/json";
|
||||
} else {
|
||||
// if (filePath.endsWith(".jpg"))
|
||||
contentType = "image/jpeg";
|
||||
@@ -85,8 +86,8 @@ export default async function readFile(filePath: string) {
|
||||
contentType = "application/pdf";
|
||||
} else if (filePath.endsWith(".png")) {
|
||||
contentType = "image/png";
|
||||
} else if (filePath.endsWith("_readability.txt")) {
|
||||
contentType = "text/plain";
|
||||
} else if (filePath.endsWith("_readability.json")) {
|
||||
contentType = "application/json";
|
||||
} else {
|
||||
// if (filePath.endsWith(".jpg"))
|
||||
contentType = "image/jpeg";
|
||||
|
||||
Reference in New Issue
Block a user