mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
update upload link&add safair support (#3812)
* update upload link&add safair support * update seafile-js version
This commit is contained in:
6
frontend/package-lock.json
generated
6
frontend/package-lock.json
generated
@@ -13360,9 +13360,9 @@
|
||||
}
|
||||
},
|
||||
"seafile-js": {
|
||||
"version": "0.2.104",
|
||||
"resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.104.tgz",
|
||||
"integrity": "sha512-KtNamxIi9YIyPqalau7yQcAbuFOskLLm+hwR9cLSEtspxDGDlyGEO2J8+MOlonJB++PY5eV6iTX6ZSnh9t5rEg==",
|
||||
"version": "0.2.105",
|
||||
"resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.105.tgz",
|
||||
"integrity": "sha512-J79Nqwx/QuvM75leYWVupCJOPiJxIDZMLU7hAwz8I6eJ5/Gh6LbGglalYSfjlWjCKnxqeKNlrtomKdbG0z1oNQ==",
|
||||
"requires": {
|
||||
"axios": "^0.18.0",
|
||||
"form-data": "^2.3.2",
|
||||
|
@@ -38,7 +38,7 @@
|
||||
"react-responsive": "^6.1.1",
|
||||
"react-select": "^2.4.1",
|
||||
"reactstrap": "^6.4.0",
|
||||
"seafile-js": "^0.2.104",
|
||||
"seafile-js": "^0.2.105",
|
||||
"socket.io-client": "^2.2.0",
|
||||
"sw-precache-webpack-plugin": "0.11.4",
|
||||
"unified": "^7.0.0",
|
||||
|
@@ -418,7 +418,7 @@ class FileUploader extends React.Component {
|
||||
this.uploadInput.current.removeAttribute('webkitdirectory');
|
||||
let repoID = this.props.repoID;
|
||||
seafileAPI.getUploadLink(repoID, this.props.path).then(res => {
|
||||
this.resumable.opts.target = res.data;
|
||||
this.resumable.opts.target = res.data + '?ret-json=1';
|
||||
if (Utils.isIEBrower()) {
|
||||
this.uploadInput.current.click();
|
||||
}
|
||||
@@ -432,7 +432,7 @@ class FileUploader extends React.Component {
|
||||
this.uploadInput.current.setAttribute('webkitdirectory', 'webkitdirectory');
|
||||
let repoID = this.props.repoID;
|
||||
seafileAPI.getUploadLink(repoID, this.props.path).then(res => {
|
||||
this.resumable.opts.target = res.data;
|
||||
this.resumable.opts.target = res.data + '?ret-json=1';
|
||||
if (Utils.isIEBrower()) {
|
||||
this.uploadInput.current.click();
|
||||
}
|
||||
@@ -446,7 +446,7 @@ class FileUploader extends React.Component {
|
||||
let repoID = this.props.repoID;
|
||||
this.uploadInput.current.setAttribute('webkitdirectory', 'webkitdirectory');
|
||||
seafileAPI.getUploadLink(repoID, this.props.path).then(res => {
|
||||
this.resumable.opts.target = res.data;
|
||||
this.resumable.opts.target = res.data + '?ret-json=1';
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -240,7 +240,8 @@ export const Utils = {
|
||||
|
||||
isSupportUploadFolder: function() {
|
||||
return navigator.userAgent.indexOf('Firefox')!=-1 ||
|
||||
navigator.userAgent.indexOf('Chrome') > -1;
|
||||
navigator.userAgent.indexOf('Chrome') > -1 ||
|
||||
navigator.userAgent.indexOf("Safari") > -1;
|
||||
},
|
||||
|
||||
isIEBrower: function() { // is ie <= ie11 not include Edge
|
||||
|
Reference in New Issue
Block a user