Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Fix compilation issues for s3storage (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobueno committed Nov 23, 2017
1 parent 40f22aa commit 21edeaa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cloud/filestore/src/impl/S3Storage.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { getLogger } from '@raincatcher/logger';
import * as BlueBird from 'bluebird';
import * as Promise from 'bluebird';
import * as mongo from 'mongodb';
import { MongoClient } from 'mongodb';
import * as path from 'path';
Expand Down Expand Up @@ -52,7 +52,7 @@ export class S3Storage implements FileStorage {
this.storageConfig = storageConfig;
}

public writeFile(metadata: FileMetadata, fileLocation: string): Promise<any> {
public writeFile(metadata: FileMetadata, fileLocation: string): Promise<string> {
const file = metadata.id;
const params = {
localFile: fileLocation,
Expand All @@ -63,7 +63,7 @@ export class S3Storage implements FileStorage {
}
};
const uploader = this.awsClient.uploadFile(params);
return new BlueBird(function(resolve, reject) {
return new Promise(function(resolve, reject) {
uploader.on('error', function(err) {
getLogger().error('An error occurred when reading file from s3', err);
reject(err.stack);
Expand All @@ -81,7 +81,7 @@ export class S3Storage implements FileStorage {
Key: file
};
const self = this;
return new BlueBird(function(resolve, reject) {
return new Promise(function(resolve, reject) {
try {
const stream = self.awsClient.downloadStream(paramsStream);
resolve(stream);
Expand Down

0 comments on commit 21edeaa

Please sign in to comment.