in-tree extjs-upload-widget

This commit is contained in:
gitadmin committed 2018-08-15 11:12:01 +03:00
1 parent 025b5f745e
commit 4635ee3492
46 files changed
+3166

No files matched your search

@@ -0,0 +1,15 @@
/**
* Abstract filename encoder.
*/
Ext.define('Ext.ux.upload.header.AbstractFilenameEncoder', {
config : {},
type : 'generic',
encode : function(filename) {},
getType : function() {
return this.type;
}
});
@@ -0,0 +1,15 @@
/**
* Base64 filename encoder - uses the built-in function window.btoa().
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa
*/
Ext.define('Ext.ux.upload.header.Base64FilenameEncoder', {
extend : 'Ext.ux.upload.header.AbstractFilenameEncoder',
config : {},
type : 'base64',
encode : function(filename) {
return window.btoa(unescape(encodeURIComponent(filename)));
}
});