forked from syncfusion/ej2-vue-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFTPFileProvider.vue
48 lines (47 loc) · 2.23 KB
/
FTPFileProvider.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<template>
<div>
<div class="control-section file-ftp">
<div class="sample-container">
<ejs-filemanager id="ftpfilemanager" :ajaxSettings='ajaxSettings' >
</ejs-filemanager>
</div>
</div>
<div id="action-description">
<p>This sample demonstrates how to utilize the <a target="_blank" href="https://github.com/SyncfusionExamples/ej2-ftp-aspcore-file-provider">File Transfer Protocol file system provider</a> to manage the files in the File Manager component.
To run the service, create a FTP connection, and then configure the FTP details such as <i><b>host name</b></i>, <i><b>user name</b></i>, and <i><b>password</b></i> in the <code>SetFTPConnection</code> method to perform the file operations.</p>
</div>
<div id="description">
<p>The File Manager component is used to explore a file system through a web application, similar to the windows explorer for windows. It supports all the basic file operations such as create, rename, delete and so on.</p>
<b>Note: </b>File Manager's upload functionality is restricted in online demo. To work with upload functionality, please download <a target="_blank" href="https://github.com/SyncfusionExamples/ej2-ftp-aspcore-file-provider">ej2-ftp-aspcore-file-provider</a> from the GitHub repository.
</div>
</div>
</template>
<style>
.file-ftp .sample-container {
margin: 10px 10px 10px 10px;
}
</style>
<script>
import Vue from "vue";
import { FileManagerPlugin, NavigationPane, Toolbar, DetailsView, FileManagerComponent } from "@syncfusion/ej2-vue-filemanager";
Vue.use(FileManagerPlugin);
/**
* File Manager sample with File Transfer Protocol
*/
let hostUrl = 'https://ej2-ftp-aspcore-service.azurewebsites.net/';
export default Vue.extend ({
data: function() {
return {
ajaxSettings: {
url: hostUrl + 'api/FTPProvider/FTPFileOperations',
getImageUrl: hostUrl + 'api/FTPProvider/FTPGetImage',
uploadUrl: hostUrl + 'api/FTPProvider/FTPUpload',
downloadUrl: hostUrl + 'api/FTPProvider/FTPDownload'
}
};
},
provide: {
filemanager: [NavigationPane, DetailsView, Toolbar]
}
});
</script>