pg-mvc-service 2.0.30 → 2.0.32

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.
@@ -275,7 +275,9 @@ class Base64Client {
275
275
  }
276
276
  fetchImageAsBase64(imageUrl) {
277
277
  return __awaiter(this, void 0, void 0, function* () {
278
- const res = yield axios_1.default.get(imageUrl);
278
+ const res = yield axios_1.default.get(imageUrl, {
279
+ responseType: 'arraybuffer' // これを追加
280
+ });
279
281
  // Content-Typeをチェック
280
282
  const contentType = res.headers['content-type'];
281
283
  if (!(contentType === null || contentType === void 0 ? void 0 : contentType.startsWith('image/'))) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-mvc-service",
3
- "version": "2.0.30",
3
+ "version": "2.0.32",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/n-daira/npm-pack_mvc-service#readme",
6
6
  "bugs": {
@@ -288,7 +288,9 @@ export class Base64Client {
288
288
  }
289
289
 
290
290
  public async fetchImageAsBase64(imageUrl: string): Promise<string> {
291
- const res = await axios.get(imageUrl);
291
+ const res = await axios.get(imageUrl, {
292
+ responseType: 'arraybuffer' // これを追加
293
+ });
292
294
 
293
295
  // Content-Typeをチェック
294
296
  const contentType = res.headers['content-type'];