Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
horstenwillem committed May 14, 2019
1 parent 19a4c23 commit 6b76dd0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Upload a file to S3
import { amazon } from '@icapps/tree-house-storage'

const options = {
filePath: 'localPath/localFile.png',
path: 'localPath/localFile.png',
content: 'fileContent ...',
name: uuid.v4(),
contentType: 'image/png',
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build"
],
"dependencies": {
"aws-sdk": "~2.452.0",
"aws-sdk": "~2.454.0",
"multer": "~1.4.1",
"tree-house": "~3.4.3",
"tree-house-errors": "~1.2.3"
Expand All @@ -29,7 +29,7 @@
"@types/cors": "~2.8.5",
"@types/express-brute": "~0.0.37",
"@types/helmet": "~0.0.43",
"@types/jest": "~24.0.12",
"@types/jest": "~24.0.13",
"@types/joi": "~14.3.3",
"@types/multer": "~1.3.7",
"@types/redis": "~2.8.12",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/amazon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function getFile(client: S3, bucket: string, key: string): Promise<
export async function uploadFile(client: S3, options: IUploadS3Options): Promise<IUploadS3Result> {
try {
let fileStream;
if (options.filePath) fileStream = await readFile(options.filePath);
if (options.path) fileStream = await readFile(options.path);

const params: S3.PutObjectRequest = {
Bucket: options.bucket,
Expand Down Expand Up @@ -144,7 +144,7 @@ export interface IUploadS3Options {
key: string;
content?: string;
encryption?: string;
filePath?: string;
path?: string;
}

export interface IUploadS3Result {
Expand Down
6 changes: 3 additions & 3 deletions tests/lib/amazon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('amazon', () => {
});

await uploadFile(awsClient, {
filePath: './uploadtest.txt',
path: './uploadtest.txt',
contentType: 'image/png',
bucket: 'bucket',
key: 'key',
Expand All @@ -74,7 +74,7 @@ describe('amazon', () => {
});

await uploadFile(awsClient, {
filePath: './uploadtest.txt',
path: './uploadtest.txt',
contentType: 'image/png',
bucket: 'bucket',
key: 'key',
Expand Down Expand Up @@ -106,7 +106,7 @@ describe('amazon', () => {
expect.assertions(NUM_ERROR_CHECKS);
try {
await uploadFile(awsClient, {
filePath: './uploadtest.txt',
path: './uploadtest.txt',
contentType: 'image/png',
bucket: 'bucket',
key: 'key',
Expand Down

0 comments on commit 6b76dd0

Please sign in to comment.