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

Commit

Permalink
Merge pull request #424 from Wardormeur/bugfix/1268-upload-dojo-image
Browse files Browse the repository at this point in the history
Bugfix/1268 upload dojo image
  • Loading branch information
josephwilk authored Nov 18, 2019
2 parents af19b7d + 3171b08 commit 78650b1
Show file tree
Hide file tree
Showing 3 changed files with 393 additions and 158 deletions.
7 changes: 6 additions & 1 deletion lib/update-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ function updateImage (args, done) {
// TODO: Maybe should we open an "opened test" bucket, but that would be.. troublesome for security reasons & $$
var s3client = cloud.storage.createClient({
provider: 'amazon',
/* Uncomment the following to make it work with fakes3
protocol: 'http://',
serversUrl: 's3:80',
forcePathBucket: true,
*/
accessKeyId: process.env.AMAZON_BUCKET_ACCESSKEYID,
accessKey: process.env.AMAZON_BUCKET_ACCESSKEY
});
Expand Down Expand Up @@ -49,7 +54,7 @@ function updateImage (args, done) {
var fileStream = new stream.PassThrough();

// Write your buffer
var fileArrayBuffer = new Uint8Array(args.file._data.data);
var fileArrayBuffer = new Uint8Array(args.file.data);
var buffer = new Buffer( fileArrayBuffer );
fileStream.end(buffer);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"node-geocoder": "^3.22",
"pg": "5.1.0",
"phoneformat.js": "^1.0.3",
"pkgcloud": "1.3.0",
"pkgcloud": "^1.5.0",
"po2json": "0.4.2",
"postgrator": "2.8.1",
"randomstring": "1.0.6",
Expand Down
Loading

0 comments on commit 78650b1

Please sign in to comment.