pg-mvc-service 2.0.30 → 2.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -283,7 +283,9 @@ class Base64Client {
|
|
|
283
283
|
}
|
|
284
284
|
// ArrayBufferをBufferに変換してBase64にエンコード
|
|
285
285
|
const buffer = Buffer.from(res.data);
|
|
286
|
-
|
|
286
|
+
const base64 = buffer.toString('base64');
|
|
287
|
+
const mimeType = this.getMimeType(base64);
|
|
288
|
+
return `data:${mimeType};base64,${base64}`;
|
|
287
289
|
});
|
|
288
290
|
}
|
|
289
291
|
}
|
package/package.json
CHANGED
|
@@ -298,6 +298,10 @@ export class Base64Client {
|
|
|
298
298
|
|
|
299
299
|
// ArrayBufferをBufferに変換してBase64にエンコード
|
|
300
300
|
const buffer = Buffer.from(res.data);
|
|
301
|
-
|
|
301
|
+
const base64 = buffer.toString('base64');
|
|
302
|
+
|
|
303
|
+
const mimeType = this.getMimeType(base64);
|
|
304
|
+
|
|
305
|
+
return `data:${mimeType};base64,${base64}`;
|
|
302
306
|
}
|
|
303
307
|
}
|