An API adapter provides some base operation for new learner to study how to use SMBJ and Jcifs in your project.
- Smbj only supports SMB2 above version
- Jcifs only supports SMB1
- Supports SMB2.0 above CRUD operation by default
- Supports SMB1.0 CRUD operation by input
smbVersion:1.0
field in api request parameters
Below diagram is generated by ChatGPT
http://localhost:8080/swagger-ui/index.html
Change the value based on your actual needs
For SMB1.0 , please add one more parameter "smbVersion":"1.0"
{
"remoteHost": "192.168.50.69",
"shareName": "LANdrive",
"domain": null,
"account": "user",
"password": "123456",
"remoteFolder": "test/",
"localFilePath": "/Users/evan/Downloads/Untitled video (4).mp4"
}
Change the value based on your actual needs
For SMB1.0 , please add one more parameter "smbVersion":"1.0"
{
"remoteHost": "192.168.50.69",
"shareName": "LANdrive",
"domain": null,
"account": "user",
"password": "123456",
"remoteFolder": "test/",
"localFolder": "/Users/evan/Downloads/",
"filePattern": ".*\\.mp4$",
"fileExtension": ".d",
"needRename": true
}
The file will be renamed to ".d" after download successfully by default
The file has been downloaded to local storage and updated the modified time
Change the value based on your actual needs
For SMB1.0 , please add one more parameter "smbVersion":"1.0"
{
"remoteHost": "192.168.50.69",
"shareName": "LANdrive",
"domain": null,
"account": "user",
"password": "123456",
"remoteFolder": "test/",
"filePattern": "*"
}
The file has been removed from remote folder
Change the value based on your actual needs
For SMB1.0 , please add one more parameter "smbVersion":"1.0"
{
"remoteHost": "192.168.50.69",
"shareName": "LANdrive",
"domain": null,
"account": "user",
"password": "123456",
"remoteFolder": "test/",
"filePattern": ".*\\.mp4$"
}
The file will show in API response
Change the value based on your actual needs
For SMB1.0 , please add one more parameter "smbVersion":"1.0"
{
"remoteHost": "192.168.50.69",
"shareName": "LANdrive",
"domain": null,
"account": "user",
"password": "123456",
"remoteFolder": "test/",
"filePattern": ".*\\.mp4$",
"prefix": "test_",
"suffix": ".d",
"newFileName": "after"
}
Before
After