mediacloud-server-client
Advanced tools
Comparing version 1.0.5 to 1.0.7
@@ -49,3 +49,3 @@ "use strict"; | ||
} | ||
async uploadMultipleFiles({ filePaths, optimize = true }) { | ||
async uploadMultipleFiles({ filePaths, optimize = false }) { | ||
var _a, _b; | ||
@@ -52,0 +52,0 @@ const form = new form_data_1.default(); |
@@ -41,3 +41,3 @@ "use strict"; | ||
mockedFs.createReadStream.mockReturnValue('mock-file-stream'); | ||
const result = await uploader.uploadMultipleFiles({ filePaths: ['/path/to/file1.jpg', '/path/to/file2.jpg'] }); | ||
const result = await uploader.uploadMultipleFiles({ filePaths: ['/path/to/file1.jpg', '/path/to/file2.jpg'], optimize: true }); | ||
(0, globals_1.expect)(result).toEqual(['https://example.com/media/image1.jpg', 'https://example.com/media/image2.jpg']); | ||
@@ -44,0 +44,0 @@ }); |
{ | ||
"name": "mediacloud-server-client", | ||
"version": "1.0.5", | ||
"version": "1.0.7", | ||
"description": "A TypeScript package for uploading files to Media Cloud API", | ||
@@ -12,2 +12,5 @@ "main": "dist/index.js", | ||
}, | ||
"contributors": [ | ||
"Ezumah Jeremiah Kalu <jerozeek2@gmail.com> (https://mediacloud.ng)" | ||
], | ||
"repository": { | ||
@@ -14,0 +17,0 @@ "type": "git", |
@@ -81,3 +81,3 @@ import axios, { AxiosInstance } from 'axios'; | ||
public async uploadMultipleFiles({ filePaths, optimize = true }: MultipleUploadOptions): Promise<string[]> { | ||
public async uploadMultipleFiles({ filePaths, optimize = false }: MultipleUploadOptions): Promise<string[]> { | ||
const form = new FormData(); | ||
@@ -84,0 +84,0 @@ filePaths.forEach((filePath) => { |
@@ -44,3 +44,3 @@ import {describe, expect, jest} from '@jest/globals'; | ||
const result = await uploader.uploadMultipleFiles({ filePaths: ['/path/to/file1.jpg', '/path/to/file2.jpg'] }); | ||
const result = await uploader.uploadMultipleFiles({ filePaths: ['/path/to/file1.jpg', '/path/to/file2.jpg'], optimize: true }); | ||
@@ -47,0 +47,0 @@ expect(result).toEqual(['https://example.com/media/image1.jpg', 'https://example.com/media/image2.jpg']); |
23884