mirror of
https://github.com/wekan/wekan.git
synced 2025-12-20 09:20:12 +01:00
Fixed Non-ASCII attachment filename will crash when downloading.
Thanks to xet7 ! Fixes #2759
This commit is contained in:
parent
843ff8eaaa
commit
c2da477735
277 changed files with 30568 additions and 52 deletions
37
packages/wekan-cfs-storage-adapter/storageAdapter.client.js
Normal file
37
packages/wekan-cfs-storage-adapter/storageAdapter.client.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* global FS, _storageAdapters:true, EventEmitter */
|
||||
|
||||
// #############################################################################
|
||||
//
|
||||
// STORAGE ADAPTER
|
||||
//
|
||||
// #############################################################################
|
||||
|
||||
_storageAdapters = {};
|
||||
|
||||
FS.StorageAdapter = function(name, options, api) {
|
||||
var self = this;
|
||||
|
||||
// Check the api
|
||||
if (typeof api === 'undefined') {
|
||||
throw new Error('FS.StorageAdapter please define an api');
|
||||
}
|
||||
|
||||
// store reference for easy lookup by name
|
||||
if (typeof _storageAdapters[name] !== 'undefined') {
|
||||
throw new Error('Storage name already exists: "' + name + '"');
|
||||
} else {
|
||||
_storageAdapters[name] = self;
|
||||
}
|
||||
|
||||
// extend self with options and other info
|
||||
FS.Utility.extend(this, options || {}, {
|
||||
name: name
|
||||
});
|
||||
|
||||
// XXX: TODO, add upload feature here...
|
||||
// we default to ddp upload but really let the SA like S3Cloud overwrite to
|
||||
// implement direct client to s3 upload
|
||||
|
||||
};
|
||||
|
||||
FS.StorageAdapter.prototype = new EventEmitter();
|
||||
Loading…
Add table
Add a link
Reference in a new issue