clineamb / gulp-s3-upload

A gulp task to upload/update assets to an S3 account.
62 stars 37 forks source link

Can't run the upload #21

Closed erzzo closed 9 years ago

erzzo commented 9 years ago

Hi, I implemented gulp-s3-upload, but I can't make it work. What am I doing wrong?

the config.js file


  deploy: {
    key: "s3key",
    secret: "s3secret"
  }

gulptask:

var gulp = require('gulp');
var config = require('../config');
var s3 = require('gulp-s3-upload')(config.deploy);

gulp.task('upload', function(){
    return gulp.src('../../build/index.html')
    .pipe(s3({
        Bucket: "somebucket-test",
        ACL: 'public-read'
    }))
});

console output:

gulp upload
[15:50:42] Using gulpfile /var/www/admin/gulpfile.js
[15:50:42] Starting 'upload'...
[15:50:42] Finished 'upload' after 25 ms

It doesn't run this function stream = es.map(function (file, callback) {

clineamb commented 9 years ago

I would make sure your directory is correct and the file exists 2 levels up.

I ran a test with your setup, and it works well for me. If the file doesn't exist, you'll get that "started" into "finished".

erzzo commented 9 years ago

Yes, you were right. The problem was that I had a gulpfile.js that loaded all the tasks and I set the path from the task not from the gulpfile. Thanks !

clineamb commented 9 years ago

Awesome. Glad to help. (: