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

Allow to define the name of the assets #2

Open
piranna opened this issue Mar 29, 2015 · 2 comments
Open

Allow to define the name of the assets #2

piranna opened this issue Mar 29, 2015 · 2 comments

Comments

@piranna
Copy link
Contributor

piranna commented Mar 29, 2015

Instead of only allow a list of strings, allow an object where keys are the assets and the value the name they will have when uploaded. As a plus, allow a list of objects too, so both objects and strings (when the name will be the same) can be combined.

@remixz
Copy link
Owner

remixz commented Apr 1, 2015

good idea! for backwards compatibility, it would always take in array, but then it could look like this:

var assets = [ '/path/to/file.txt', { name: 'foo.txt', path: '/path/to/bar.txt' } ]

if it's just a string passed in, then the basename of the string is used for the name, but if an object, it'll use the name property

@piranna
Copy link
Contributor Author

piranna commented Apr 1, 2015

What you say it's just what I added in the "as a plus" section ;-) Good to know you liked it! :-D

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

No branches or pull requests

3 participants