on 09-06-2017 3:37 AM
We are planning to migrate our Hybris 5.7 instance from on-premise servers to AWS servers.
One thing we noticed is that the data folder in on-premise is "sys_master" (with an underscore), while the data folder in AWS S3 bucket is "sys-master" (with a dash). So, the media data / images (that we migrate from on-premise to S3) (as well as the database, which we are also migrating to Amazon RDS) cannot be displayed correctly in AWS, because it's not able to resolve the path.
How do we fix this issue? Is it possible for Amazon S3 bucket to use sys_master, instead of sys-master?
We couldn't find a solution using source code or configuration. However, we had a workaround, which I described here: https://answers.sap.com/answers/12804351/view.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The "sys-master" path element is added in the S3MediaStorageStrategy.setTenantPrefix() method:
public void setTenantPrefix() {
this.tenantPrefix = "sys-" + Registry.getCurrentTenantNoFallback().getTenantID().toLowerCase();
}
Therefore, to override this, you can create a new media storage strategy that inherits from S3MediaStorageStrategy, and then override the setTenantPrefix() method so that it uses "sys_" rather than "sys-".
Beware: some of the other S3 classes use the same logic to construct a tenant prefix so you will also need to replace them: S3MediaStorageCleaner is the one I know about, you may want to look through the other classes in the extension to check.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Geff, Please let us if your issue is solved. We are facing same issues.
Thanks, Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.