0.0.28 • Published 8 months ago
@min98/filemanager-react v0.0.28
Package File Manager
Frontend Package File Manager for
Documentation
Use
import { Client, FileManagerAPI, FileManager } from "@min98/filemanager-react";
const token = LocalStorage.getItem("access_token");
const lang = LocalStorage.getItem("lang");
const client = new Client(
"http://127.0.0.1:8000/api/v1/fm",
true,
token,
"en"
);
const API = new FileManagerAPI(client);
<FileManager API={API} lang={lang} />
- can customize the file manager if you not use API follow interface
- example default file manager for
import { Client } from "./Client";
import { AbstractFileManagerAPI } from "./AbstractFileManagerAPI ";
export class FileManagerAPI extends AbstractFileManagerAPI {
public client: Client;
constructor(client: Client) {
super(client,);
this.client = client;
}
/**
* api disk
*/
initialize = (disk: string, path: string = "") => {
return this.client.createRequest("get", "initialize", {
params: {
disk,
path
}
});
};
content = (disk: string, path: string = "") => {
return this.client.createRequest("get", "content", {
params: {
disk,
path
}
});
};
// Continue method follow AbstractFileManagerAPI
}
0.0.28
8 months ago
0.0.20
10 months ago
0.0.21
10 months ago
0.0.22
10 months ago
0.0.23
10 months ago
0.0.24
10 months ago
0.0.25
10 months ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
0.0.15
10 months ago
0.0.16
10 months ago
0.0.17
10 months ago
0.0.18
10 months ago
0.0.19
10 months ago
0.0.10
10 months ago
0.0.11
10 months ago
0.0.12
10 months ago
0.0.13
10 months ago
0.0.14
10 months ago
0.0.1
1 year ago
0.0.0
1 year ago
0.0.3
1 year ago
0.0.2
1 year ago
0.0.26
9 months ago
0.0.9
10 months ago
0.0.27
9 months ago
0.0.8
10 months ago
0.0.5
1 year ago
0.0.4
1 year ago
0.0.7
10 months ago
0.0.6
10 months ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago