mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
client/posts: add file extensions info to upload
This commit is contained in:
@ -11,8 +11,9 @@ class FileDropperControl extends events.EventTarget {
|
||||
|
||||
this._options = options;
|
||||
const source = template({
|
||||
allowMultiple: this._options.allowMultiple,
|
||||
allowUrls: this._options.allowUrls,
|
||||
extraText: options.extraText,
|
||||
allowMultiple: options.allowMultiple,
|
||||
allowUrls: options.allowUrls,
|
||||
id: 'file-' + Math.random().toString(36).substring(7),
|
||||
});
|
||||
|
||||
@ -21,7 +22,7 @@ class FileDropperControl extends events.EventTarget {
|
||||
this._urlConfirmButtonNode = source.querySelector('button');
|
||||
this._fileInputNode = source.querySelector('input[type=file]');
|
||||
this._fileInputNode.style.display = 'none';
|
||||
this._fileInputNode.multiple = this._options.allowMultiple || false;
|
||||
this._fileInputNode.multiple = options.allowMultiple || false;
|
||||
|
||||
this._counter = 0;
|
||||
this._dropperNode.addEventListener(
|
||||
|
@ -156,6 +156,8 @@ class PostUploadView extends events.EventTarget {
|
||||
this._contentFileDropper = new FileDropperControl(
|
||||
this._contentInputNode,
|
||||
{
|
||||
extraText:
|
||||
'Allowed extensions: .jpg, .png, .gif, .webm, .mp4, .swf',
|
||||
allowUrls: true,
|
||||
allowMultiple: true,
|
||||
lock: false,
|
||||
|
Reference in New Issue
Block a user