We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc09c82 commit 3eeff01Copy full SHA for 3eeff01
lib/file.js
@@ -505,12 +505,14 @@
505
if(AV._isNode){
506
//Use qiniu sdk to upload files to qiniu.
507
var qiniu = require('qiniu');
508
+ var path = require('path');
509
self._previousSave = self._source.then(function(base64, type) {
510
//Create 16-bits uuid as qiniu key.
511
var hexOctet = function() {
512
return Math.floor((1+Math.random())*0x10000).toString(16).substring(1);
513
};
- var key = hexOctet() + hexOctet() + hexOctet() + hexOctet();
514
+ var key = hexOctet() + hexOctet() + hexOctet() + hexOctet()
515
+ + path.extname(self._name);
516
var data = {
517
key: key,
518
ACL: self._acl,
0 commit comments