forked from syncfusion/ej2-vue-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathibm-cos-node-file-provider.vue
50 lines (47 loc) · 2.27 KB
/
ibm-cos-node-file-provider.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
49
50
<template>
<div>
<div class="control-section file-ibm">
<div class="sample-container">
<ejs-filemanager id="filemanager" :ajaxSettings='ajaxSettings' :rootAliasName='rootAliasName' >
</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-filemanager-ibm-cos-node-file-provider">IBM Cloud Object Storage file provider</a> with File Manager component. The <code>ej2-filemanager-ibm-cos-node-file-provider</code> is an NPM package for file provider which is available in npmjs, refer this <a target="_blank" href="https://www.npmjs.com/package/@syncfusion/ej2-filemanager-ibm-cos-node-file-provider">link</a> to download package.</p>
</div>
<div id="description">
<p>The File Manager component is used to explore a file 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>
<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-filemanager-ibm-cos-node-file-provider">IBM Cloud Object Storage file provider</a> from the GitHub repository.</p>
</div>
</div>
</template>
<style>
.file-ibm .sample-container {
margin: 10px 10px 10px 10px;
}
</style>
<script>
import Vue from "vue";
import { FileManagerPlugin, NavigationPane, Toolbar, DetailsView, ContextMenu, FileManagerComponent } from "@syncfusion/ej2-vue-filemanager";
Vue.use(FileManagerPlugin);
/**
* File Manager sample with IBM Cloud Object Storage service
*/
let hostUrl = 'https://ej2-ibm-cos-node-file-provider.azurewebsites.net/';
export default Vue.extend ({
data: function() {
return {
ajaxSettings: {
url: hostUrl,
getImageUrl: hostUrl + 'GetImage',
uploadUrl: hostUrl + 'Upload',
downloadUrl: hostUrl + 'Download'
},
rootAliasName:"Files"
};
},
provide: {
filemanager: [NavigationPane, DetailsView, Toolbar, ContextMenu]
}
});
</script>