Update file-storage-configuration.md Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/7cd2e633 Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/7cd2e633 Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/7cd2e633
Branch: refs/heads/two-dot-o Commit: 7cd2e633409fae5e2b483cbd9c59feabc9561ba3 Parents: 329a9e0 Author: Jan Moritz Lindemann <124...@supinfo.com> Authored: Sun Apr 26 16:00:14 2015 -0400 Committer: Jan Moritz Lindemann <124...@supinfo.com> Committed: Sun Apr 26 16:00:14 2015 -0400 ---------------------------------------------------------------------- docs/file-storage-configuration.md | 52 +++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/7cd2e633/docs/file-storage-configuration.md ---------------------------------------------------------------------- diff --git a/docs/file-storage-configuration.md b/docs/file-storage-configuration.md index e69de29..33ea359 100644 --- a/docs/file-storage-configuration.md +++ b/docs/file-storage-configuration.md @@ -0,0 +1,52 @@ +# File storage configuration + +Usergrid can store your assets either on your hard drive or in the Amazon S3 cloud. + +Local storage configuration +--- + +By default assets are stored in the temporary folder /tmp/usergrid +to change this + + +This is an alternative to the S3BinaryStore class in Usergrid. +It has several advantages : + - upload files up to 50GB + - support of V4 signing process + - lower network latency when a regionName is defined + +To use it add following dependency in stack/pom.xml + +```xml + <dependency> + <groupId>com.amazonaws</groupId> + <artifactId>aws-java-sdk-s3</artifactId> + <version>1.9.31</version> + </dependency> +``` +and stack/services/pom.xml +```xml + <dependency> + <groupId>com.amazonaws</groupId> + <artifactId>aws-java-sdk-s3</artifactId> + </dependency> +``` +then add the AwsSdkS3BinaryStore.java file in the /stack/services/src/main/java/org/apache/usergrid/services/assets/data/ folder. + +finaly define the new classpath in the /stack/rest/src/main/resources/usergrid-rest-context.xml file +```xml + <bean id="binaryStore" class="org.apache.usergrid.services.assets.data.AwsSdkS3BinaryStore"> + <constructor-arg name="accessId" value="x" /> + <constructor-arg name="secretKey" value="xx" /> + <constructor-arg name="bucketName" value="x" /> + <constructor-arg name="regionName" value="eu-central-1" /> + </bean> +``` +the regionName field is not mandatory, this code is also valid +```xml + <bean id="binaryStore" class="org.apache.usergrid.services.assets.data.AwsSdkS3BinaryStore"> + <constructor-arg name="accessId" value="x" /> + <constructor-arg name="secretKey" value="xx" /> + <constructor-arg name="bucketName" value="x" /> + </bean> +```