S3DB - Simple and Sloppy Semantic Database
The S3DB API can also be used for uploading files into S3DB. This process involves three steps:
- Providing S3DB with the key and a filename in order to receive a temporary filekey that will identify each fragment
- Uploading the file to a temporary folder by fragments encoded in base64
- Inserting the file as a statement
Uploading large files into S3DB becomes possible using the S3DB module "uploads.php". Files can be sent to this module in packages of base64 encoded string. The file uploading requires the following sequence of steps:
- Provide uploads.php with a valid S3DB key and a filename (if provided, filesize will also be used). Both parameters are provided to "uploads.php" using the GET method.
- Use the filekey to upload the fragments, indicating in each case the order of the fragment being uploaded and the total number of fragments.
If the fragments were encoded individually use encode=2 (encode=1 or empty encode expect the entire file to have been encoded at once)
Note: The variables filekey, fragNr, encode and fileStr can also be sent using a POST instead of a GET
- Once all the fragments have been uploaded, insert the file on S3DB using the S3QL insert file query (see Insert queries). If this step is not completed, the temporary uploaded file will be deleted.
Previous/Table of Contents
Email: email@example.com, firstname.lastname@example.org