javascript - S3 jQuery objectProperties file (key) naming and path? -
i have working implementation of s3 + jquery setup own bucket. 1 problem noticed default object created defaults uuid name file rather original file name. adjusting request include objectproperties key "filename" resolved upload root of bucket. understand s3 , object storage lacks real directory structure big bucket ability reference object such bucketname/somepath/filename.jpg allows create code around "pseudo path". application in s3 bucket (and relies heavily upon it). there object property can use define path file when upload (in essence creating virtual key path object in s3?) need workflow : https://mybucketname.s3.amazonaws.com/somefakedirname/anotherfakedirname/photo.jpg. there way create s3 api?
yes, can define function value objectproperties.key option. example:
objectproperties: { key: function(fileid) { return 'dir1/dir2/dir3/' + this.getname(fileid); }, }
Comments
Post a Comment