This is a SAMBA interoperability Adapter for InterSystems IRIS. Using this adapter is possible read, write and find remote files and folders using SAMBA v2/v3 protocol.
Open IRIS Namespace with Interoperability Enabled. Open Terminal and call: USER>zpm "install samba-iris-adapter"
Clone/git pull the repo into any local directory
$ git clone https://github.com/yurimarx/samba-iris-adapter.git
Open the terminal in this directory and run:
$ docker-compose build
- Run the IRIS container with your project:
$ docker-compose up -d
-
Go to the credentials and Set credentials and save with these values:
-
Open the production and start it.
-
Go to your REST client app and use these REST operations (with basic auth and credentials _SYSTEM/SYS):
- To Create a new Remote Folder: POST http://localhost:52795/csp/samba/CreateFolder with JSON Body: {"Folder":"foldername"}
- To Send a File to a Remote Folder: POST http://localhost:52795/csp/samba/CreateFile/foldername with form-data selected to send multipart file. The name of the multipart file is file and in value select any file from your computer, check this image with a example using postman:
- To List files inside a Remote Folder: GET http://localhost:52795/csp/samba/ListFilesIntoFolder/{foldername}
- To Get a File: POST http://localhost:52795/csp/samba/DownloadFile with JSON Body: {"Folder":"directory4", "Filename":"cat.jpg"}. Check this image as sample:
- To Delete a Remote Folder: DELETE http://localhost:52795/csp/samba/DeleteFolder with JSON Body: {"Folder":"foldername"}