Storage
Uploading Documents
Our storage service allows you to securely encrypt and store your documents with Strongdoc.
Upload Document
To upload documents, pass the raw bytes into the function together with a key (a string that uniquely identifies the document). The payload can be any arbitrary bytes. In this case, the bytes are obtained from a file located locally in the same directory as the Go program being executed.
- Go
- NodeJS
- Java
- Python
Upload Document (Streaming)
You may also stream the document, which you may want if your file is too big or if you want to stream the bytes on the fly.
- Go
- NodeJS
- Java
- Python
Downloading Documents
To download the documents, you should keep track of the documents which you have uploaded. You must provide the DocID of the uploaded document.
Download Document
The file is returned as a byte slice containing the plaintext of the document.
- Go
- NodeJS
- Java
- Python
Download Document (Streaming)
The file download also offered as a streaming service, which you may want to do if your file is too big or if you want to stream the bytes on the fly.
- Go
- NodeJS
- Java
- Python
DownloadDocumentStream
returns an io.Reader
stream.
When Read()
is called on the stream, your document is 'lazily' decrypted via Strongsalt encrytion and downloaded, and the plaintext filling the buffer provided.
List Document
This function allows you to list the documents that you can access. The return object is an array of Document
. This object has three properties, DocName
, DocID
and Size
.
- Go
- NodeJS
- Java
- Python
Remove Document
Remove Document
deletes a document that you can access.
If you are a regular user, you may only remove a document that belongs to you. If you are an administrator, you can remove all the documents of the organization for which you are an administrator.
Attempting to remove a nonexistent document throws an error.
- Go
- NodeJS
- Java
- Python