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

Use case to support multiple files per target #10

Open
gregor opened this issue Apr 27, 2015 · 2 comments
Open

Use case to support multiple files per target #10

gregor opened this issue Apr 27, 2015 · 2 comments
Assignees

Comments

@gregor
Copy link

gregor commented Apr 27, 2015

grunt-http-upload looks like a promising upload solution. I wanted to use it with RayGun to upload map- and js-files. They have an API endpoint which is documented here: https://raygun.io/docs/workflow/source-maps The one file per target totally limits this use case currently.

@julienma
Copy link
Member

It seems restler handles multiple files upload, so there's probably a way to make it work in grunt-http-upload.

Considering that uploading a file is just a matter of adding a new field in the data array, I think we could replace the static fields in grunt task

      src: '<%= yeoman.dist %>/dist.zip',
      dest: 'myField'

with a new files object which could then handle multiple files:

        files: {
          'myField': '<%= yeoman.dist %>/dist.zip',
          'myOtherField': 'script.js'
        },

If files is empty or undefined, then we could fall back to the current src and dest fields, so it won't break current implementation.

@gregor WDYT? Fancy trying and proposing a PR?

@wthomsen
Copy link

For others stumbling upon this issue for the Raygun source map use case, consider https://github.com/clubdesign/grunt-raygun-sourcemaps

@julienma julienma self-assigned this Oct 19, 2015
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

3 participants