publish-release icon indicating copy to clipboard operation
publish-release copied to clipboard

Allow to define the name of the assets

Open piranna opened this issue 10 years ago • 2 comments

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.

piranna avatar Mar 29 '15 20:03 piranna

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

remixz avatar Apr 01 '15 01:04 remixz

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

piranna avatar Apr 01 '15 11:04 piranna