@electerm/electerm-react 3.15.42 → 3.15.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -870,6 +870,9 @@ export default class FileSection extends React.Component {
|
|
|
870
870
|
downloadFromBrowser = async () => {
|
|
871
871
|
const { path, name, isDirectory } = this.state.file
|
|
872
872
|
const p = resolve(path, name)
|
|
873
|
+
if (window.et.downloadFromBrowser) {
|
|
874
|
+
return window.et.downloadFromBrowser(p)
|
|
875
|
+
}
|
|
873
876
|
const url = '/api/download?path=' + encodeURIComponent(p)
|
|
874
877
|
const res = await window.api.fetch(url)
|
|
875
878
|
.catch(window.store.onError)
|
|
@@ -1265,7 +1268,6 @@ export default class FileSection extends React.Component {
|
|
|
1265
1268
|
const props = {
|
|
1266
1269
|
className,
|
|
1267
1270
|
draggable: draggable && !isParent,
|
|
1268
|
-
onDrop: this.onDrop,
|
|
1269
1271
|
onDragStart: onDragStart || this.onDragStart,
|
|
1270
1272
|
'data-id': id,
|
|
1271
1273
|
id: this.id,
|
|
@@ -972,6 +972,12 @@ export default class Sftp extends Component {
|
|
|
972
972
|
}
|
|
973
973
|
|
|
974
974
|
handleUploadFromBrowser = () => {
|
|
975
|
+
if (window.et.handleUploadFromBrowser) {
|
|
976
|
+
return window.et.handleUploadFromBrowser(
|
|
977
|
+
this.state.localPath,
|
|
978
|
+
this.localList
|
|
979
|
+
)
|
|
980
|
+
}
|
|
975
981
|
const input = document.createElement('input')
|
|
976
982
|
input.type = 'file'
|
|
977
983
|
input.multiple = true
|