mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 07:08:55 +00:00
repair upload bug
This commit is contained in:
@@ -8,7 +8,8 @@ if (typeof Promise === 'undefined') {
|
|||||||
window.Promise = require('promise/lib/es6-extensions.js');
|
window.Promise = require('promise/lib/es6-extensions.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
require('babel-polyfill');
|
// require('babel-polyfill');
|
||||||
|
require('react-app-polyfill/stable');
|
||||||
|
|
||||||
// fetch() polyfill for making API calls.
|
// fetch() polyfill for making API calls.
|
||||||
require('whatwg-fetch');
|
require('whatwg-fetch');
|
||||||
|
@@ -414,19 +414,19 @@ class FileUploader extends React.Component {
|
|||||||
|
|
||||||
onFileUpload = () => {
|
onFileUpload = () => {
|
||||||
this.uploadInput.current.removeAttribute('webkitdirectory');
|
this.uploadInput.current.removeAttribute('webkitdirectory');
|
||||||
this.uploadInput.current.click();
|
|
||||||
let repoID = this.props.repoID;
|
let repoID = this.props.repoID;
|
||||||
seafileAPI.getUploadLink(repoID, this.props.path).then(res => {
|
seafileAPI.getUploadLink(repoID, this.props.path).then(res => {
|
||||||
this.resumable.opts.target = res.data;
|
this.resumable.opts.target = res.data;
|
||||||
|
this.uploadInput.current.click();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onFolderUpload = () => {
|
onFolderUpload = () => {
|
||||||
this.uploadInput.current.setAttribute('webkitdirectory', 'webkitdirectory');
|
this.uploadInput.current.setAttribute('webkitdirectory', 'webkitdirectory');
|
||||||
this.uploadInput.current.click();
|
|
||||||
let repoID = this.props.repoID;
|
let repoID = this.props.repoID;
|
||||||
seafileAPI.getUploadLink(repoID, this.props.path).then(res => {
|
seafileAPI.getUploadLink(repoID, this.props.path).then(res => {
|
||||||
this.resumable.opts.target = res.data;
|
this.resumable.opts.target = res.data;
|
||||||
|
this.uploadInput.current.click();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user