This is a quick windows console application that shows how to upload a file to Square-9's GlobalSearch API.
To get started, in the main(String[] args)
method of Program.cs, update the following to match your GlobalSearch Installation.
- The website target in
RestClient("");
new HttpBasicAuthenticator("S9UserName", "S9Password");
Replace S9UserName and S9Password with your S9 user or windows (including domain) username and password.var databaseID =
the databse you want to upload to.var archiveID =
the archive you want to index the document into.var localFileName = ""
the name of the file on your local machine you want to upload and index.
NOTE: Requires .NET v4 and a version of VisualStudio running NuGet with NuGet Package Restore enabled.
Run the application!
The upload happens in 4 steps:
- POST a file to the server.
- Obtain a license.
- Index the document using the file that was uploaded, and some provided field data into a database/archive.
- Release the license.
Enjoy! Please see the issues list for ideas on how to fork and contribute!