Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: send files with their paths to s3 #65

Open
kgraf80 opened this issue Mar 19, 2020 · 0 comments
Open

Feature Request: send files with their paths to s3 #65

kgraf80 opened this issue Mar 19, 2020 · 0 comments

Comments

@kgraf80
Copy link

kgraf80 commented Mar 19, 2020

Can you change code in /gulp-s3-upload/index.js

from:
keyname = keyTransform(file.relative);
to:
keyname = keyTransform(file.relative, file.path);

in this code:

if(keyTransform) {

    //  Allow the transform function to take the
    //  complete path in case the user wants to change
    //  the path of the file, too.

    // >>>>>>> change here
    keyname = keyTransform(file.relative);

} else {
    // ...Otherwise keep it exactly parallel.

    keyparts = helper.parsePath(file.relative);
    keyname  = helper.buildName(keyparts.dirname, keyparts.basename + keyparts.extname);
}

It help send files with their paths when we use keyTransform (see my answer in #33)
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant