A AWS3 Connector to use as File Storage
The main deploy is org.spin.eca62.setup.Deploy
, used to connect this plibrary with a minio instance like is generated here
Currently the old implementation for ADempiere not work with the new definition, here a example of new definition org.spin.util.AttachmentUtil
The files are store depending of follow parameters:
- Client ID
- Container Type
- Container ID
- Table
- Record ID
- User ID
- Resource Name
- Client ID:
8d4e103d-6add-474f-948d-3d9bcbe7b541
- Container Type:
resource
- Container ID:
image
- Table:
AD_Image
- Record ID:
1000002
- User ID: No apply
- Resource Name:
2024-04-01_10-16.png
The route to store this resource is <bucket name>/8d4e103d-6add-474f-948d-3d9bcbe7b541/client/resource/image/ad_image/1000002/2024-04-01_10-16.png
- Client ID:
8d4e103d-6add-474f-948d-3d9bcbe7b541
- Container Type:
resource
- Container ID:
archive
- Table:
AD_AppRegistration
- Record ID:
1000000
- User ID: No apply
- Resource Name:
GardenWorld---Application-Registration.pdf
The route to store this resource is <bucket name>/8d4e103d-6add-474f-948d-3d9bcbe7b541/client/resource/archive/ad_appregistration/1000000/gardenworld---application-registration.pdf
- Client ID:
8d4e103d-6add-474f-948d-3d9bcbe7b541
- Container Type:
attachment
- Container ID: No Apply
- Table:
AD_AppRegistration
- Record ID:
1000000
- User ID: No apply
- Resource Name:
-2024-02-10-2119.png
The route to store this resource is <bucket name>/8d4e103d-6add-474f-948d-3d9bcbe7b541/client/attachment/ad_appregistration/1000000/-2024-02-10-2119.png
- Client ID:
8d4e103d-6add-474f-948d-3d9bcbe7b541
- Container Type:
attachment
- Container ID: No Apply
- Table:
AD_AppRegistration
- Record ID:
1000000
- User ID: No apply
- Resource Name:
09920_eca62_add_app_support.xml
The route to store this resource is <bucket name>/8d4e103d-6add-474f-948d-3d9bcbe7b541/client/attachment/ad_appregistration/1000000/09920_eca62_add_app_support.xml
- Client ID:
8d4e103d-6add-474f-948d-3d9bcbe7b541
- Container Type:
attachment
- Container ID: No Apply
- Table:
AD_AppRegistration
- Record ID:
1000000
- User ID: No apply
- Resource Name:
a.xml
The route to store this resource is <bucket name>/8d4e103d-6add-474f-948d-3d9bcbe7b541/client/attachment/ad_appregistration/1000000/a.xml
You can get all binaries from github here.
All contruction is from github actions
All dictionary changes are writing from XML and all XML's hare xml/migration
Is very easy.
- Gradle
implementation 'io.github.adempiere:adempiere-s3-connector:1.0.0'
- SBT
libraryDependencies += "io.github.adempiere" % "adempiere-s3-connector" % "1.0.0"
- Apache Maven
<dependency>
<groupId>io.github.adempiere</groupId>
<artifactId>adempiere-s3-connector</artifactId>
<version>1.0.0</version>
</dependency>
Is nice to have a reference of table and column of image reference, the problem right now is that these reference is manage by Adempiere controller and the patch add for AttachmentUtil
is located in model layer.