How do I pass a variable for naming files in slingshot?


#1

How do I pass a variable myvar from the event to key for naming the file in slingshot?

Slingshot.createDirective(“slingUpload”, Slingshot.S3Storage, {

key: function (file) {
return Date.now() + “" + myvar + "” + file.name;
}

});

Is there a way to get the file object using just slingshot and raix:ui-dropped-event? Now I use FS.Utility.eachFile to get it.


#2

I solved the first question, how to pass a variable.