mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 15:19:06 +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');
|
||||
}
|
||||
|
||||
require('babel-polyfill');
|
||||
// require('babel-polyfill');
|
||||
require('react-app-polyfill/stable');
|
||||
|
||||
// fetch() polyfill for making API calls.
|
||||
require('whatwg-fetch');
|
||||
|
@@ -414,19 +414,19 @@ class FileUploader extends React.Component {
|
||||
|
||||
onFileUpload = () => {
|
||||
this.uploadInput.current.removeAttribute('webkitdirectory');
|
||||
this.uploadInput.current.click();
|
||||
let repoID = this.props.repoID;
|
||||
seafileAPI.getUploadLink(repoID, this.props.path).then(res => {
|
||||
this.resumable.opts.target = res.data;
|
||||
this.uploadInput.current.click();
|
||||
});
|
||||
}
|
||||
|
||||
onFolderUpload = () => {
|
||||
this.uploadInput.current.setAttribute('webkitdirectory', 'webkitdirectory');
|
||||
this.uploadInput.current.click();
|
||||
let repoID = this.props.repoID;
|
||||
seafileAPI.getUploadLink(repoID, this.props.path).then(res => {
|
||||
this.resumable.opts.target = res.data;
|
||||
this.uploadInput.current.click();
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user