MathType storage classes for Amazon Web Services S3
Custom MathType storage classes
MathType integrations need to store two pieces of information in the server. By default, this information is stored in the filesystem:
- The inverse association <digest> to MathML. This data cannot be removed unless it exists a mechanism able to regenerate them.
- A cache with the images generated from MathML. This cache can be removed if necessary and it will be regenerated when formulas are displayed.
In order to use Amazon S3 for storing and retrievingMathTypecache it is necessary to implement
com.wiris.plugin.storage.StorageAndCacheinterface interface. See server-side API for a description of the interface.
How to use the examples
The following examples show how to implement a S3 Storage class for Java, PHP and .Net . These sample classes al fully functional.
The following steps should be followed in order to run them. However, put hardcoded credentials is a bad practice, here are used to simplify the example. You can visit the links to PHP, Java and .Net to learn how to do it well.
- First of all, change the BUCKET_NAME value to the name of your bucket.
- Then, insert your credential keys (i.e: ACCESS_KEY and SECRET_KEY values).
- Next, change the REGION value.
- Finally, change the key
configuration.inito point to the S3 cache class. See the formula persistence section for more information.