@ozdao/prometheus-framework 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
package/dist/files.server.js
CHANGED
@@ -71,7 +71,7 @@ function requireMiddlewareMulter() {
|
|
71
71
|
};
|
72
72
|
const createThumbnail = async (originalPath, thumbnailPath) => {
|
73
73
|
try {
|
74
|
-
await sharp(originalPath).resize(
|
74
|
+
await sharp(originalPath).resize({ width: 800 }).toFile(thumbnailPath);
|
75
75
|
} catch (error) {
|
76
76
|
console.error("Error creating thumbnail:", error);
|
77
77
|
}
|
package/dist/files.server.mjs
CHANGED
@@ -70,7 +70,7 @@ function requireMiddlewareMulter() {
|
|
70
70
|
};
|
71
71
|
const createThumbnail = async (originalPath, thumbnailPath) => {
|
72
72
|
try {
|
73
|
-
await sharp(originalPath).resize(
|
73
|
+
await sharp(originalPath).resize({ width: 800 }).toFile(thumbnailPath);
|
74
74
|
} catch (error) {
|
75
75
|
console.error("Error creating thumbnail:", error);
|
76
76
|
}
|
package/package.json
CHANGED
@@ -36,14 +36,13 @@ const createStorage = (folderName, publicPath) => {
|
|
36
36
|
const createThumbnail = async (originalPath, thumbnailPath) => {
|
37
37
|
try {
|
38
38
|
await sharp(originalPath)
|
39
|
-
.resize(
|
39
|
+
.resize({ width: 800 })
|
40
40
|
.toFile(thumbnailPath);
|
41
41
|
} catch (error) {
|
42
42
|
console.error("Error creating thumbnail:", error);
|
43
43
|
}
|
44
44
|
};
|
45
45
|
|
46
|
-
|
47
46
|
const middlewareFactory = (db, publicPath) => {
|
48
47
|
const uploadSingleFileMiddleware = async (req, res, next) => {
|
49
48
|
|