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

Commit 78650b1

Browse files
authored
Merge pull request #424 from Wardormeur/bugfix/1268-upload-dojo-image
Bugfix/1268 upload dojo image
2 parents af19b7d + 3171b08 commit 78650b1

File tree

3 files changed

+393
-158
lines changed

3 files changed

+393
-158
lines changed

lib/update-image.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ function updateImage (args, done) {
1010
// TODO: Maybe should we open an "opened test" bucket, but that would be.. troublesome for security reasons & $$
1111
var s3client = cloud.storage.createClient({
1212
provider: 'amazon',
13+
/* Uncomment the following to make it work with fakes3
14+
protocol: 'http://',
15+
serversUrl: 's3:80',
16+
forcePathBucket: true,
17+
*/
1318
accessKeyId: process.env.AMAZON_BUCKET_ACCESSKEYID,
1419
accessKey: process.env.AMAZON_BUCKET_ACCESSKEY
1520
});
@@ -49,7 +54,7 @@ function updateImage (args, done) {
4954
var fileStream = new stream.PassThrough();
5055

5156
// Write your buffer
52-
var fileArrayBuffer = new Uint8Array(args.file._data.data);
57+
var fileArrayBuffer = new Uint8Array(args.file.data);
5358
var buffer = new Buffer( fileArrayBuffer );
5459
fileStream.end(buffer);
5560

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"node-geocoder": "^3.22",
6262
"pg": "5.1.0",
6363
"phoneformat.js": "^1.0.3",
64-
"pkgcloud": "1.3.0",
64+
"pkgcloud": "^1.5.0",
6565
"po2json": "0.4.2",
6666
"postgrator": "2.8.1",
6767
"randomstring": "1.0.6",

0 commit comments

Comments
 (0)