Documentation
AWS S3 Integration for Perfex CRM
If you have any questions beyond the scope of this help file, feel free to email us at support@maniss.dev.
How it works
Watch this video to understand how the module works.
Installation
Follow the steps below to set up the module:
- Unzip the downloaded file from CodeCanyon. You'll get aws_integration.zip and the documentation folder.
- Go to your Perfex admin and navigate to Setup > Modules.
- Upload aws_integration.zip and click Install.
- If everything is correct, you should see the module name, description, and two buttons: Activate & Uninstall.
- Click Activate, and that's pretty much it.
Credentials
Before using the module, you need to obtain AWS Credentials. Please follow the instructions carefully; otherwise, the module won't function properly.
Create User Group
- On the left sidebar, click User Groups, then click Create group.
- Specify a name for the group and scroll down to Attach permissions policies.
- Search for S3FullAccess and select it.
- Click Create user group.
Create User
- On the left sidebar, click Users, then click Create user.
- Specify a name for the user and click Next.
- Select Add user to group and choose the group created in the previous step.
- Click Next and then click Create user.
- Go back to Users and click on the user you created.
- In Summary, locate Access key 1 and click Create access key.
- Select Third-party service, check I understand the above, and click Next.
- Skip the description field and click Create access key.
- Copy the Access keys by clicking the copy icon, and save them somewhere safe. Click Show to view the Secret access key.
Note: You must copy the access keys at this step; otherwise, there will be no other way to retrieve them. Ensure you save them in a secure place, as Amazon AWS will not display the secret access key again.
Create S3 Bucket
- Go to the AWS S3 Console.
- Click Create bucket.
- Specify a unique name for the bucket.
- Scroll to Block Public Access, uncheck Block all public access, and check I acknowledge.
- Ignore the remaining settings and click Create bucket.
- Click on the bucket name you created and locate Permissions.
- Scroll to Bucket policy and click Edit.
- Paste the following code into the policy, replace bucketnamehere with your bucket name, and click Save changes.
- Scroll to Access control list (ACL) and click Edit.
- Return to Access control list (ACL) and click Edit again.
- Find Everyone (public access) and select List and Read. Check I understand and click Save changes.
- Finally, scroll to Cross-origin resource sharing (CORS) and click Edit.
- Paste the following code and click Save changes.
{
"Version": "2012-10-17",
"Id": "Policy1692807538499",
"Statement": [
{
"Sid": "Stmt1692807537432",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::bucketnamehere"
}
]
}
Note: If you can't click Edit, click bucket owner enforced, select ACLs enabled, check I acknowledge, and then click Save changes.
[
{
"AllowedHeaders": [],
"AllowedMethods": [
"GET",
"PUT",
"POST",
"DELETE"
],
"AllowedOrigins": [
"*"
]
}
]
Module Settings
Now for the easy part: adding the credentials to the module settings in Perfex CRM.
- Go to Setup > AWS S3 Integration.
- Enable AWS S3 Integration.
Add the Access key ID and Secret Access key from the previous steps.
Add the Default Region (where you created your bucket). In this example, I usedus-east-1
.
Finally, add the S3 Bucket Name. - Click Save, and that's it. You can test the module by uploading a file, for example, to Project Files.
Use Other S3-Compatible Storage
The AWS S3 module now supports other S3-compatible storage platforms, such as Wasabi or Minio, without requiring code modifications. Simply go to the settings, add the endpoint, enable "Use Path Style Endpoint," and you're all set.
Custom Hooks
Custom hooks is a new functionality that allows you to extend Perfex. We use them in the AWS S3 module to support new features such as Project Discussion Comment Attachments and to enhance file deletion from S3.
Note: To properly set up the custom hooks, your hosting server must have file write permissions enabled.
Once you install the module, the custom hooks will be set up automatically.
However, if you update Perfex to a new version or modify the core files, the module may not function properly because the custom hooks will be removed.
If this happens, an announcement will appear in the admin panel, informing you to set up the hooks before using the AWS S3 module. Simply click "Setup Hooks," and the hooks will be re-added.
Features
- Uploading files to AWS S3
- Downloading files from AWS S3
- Deleting files from AWS S3
Supported areas:
- All areas are now supported in version 1.1
Support
If you have any questions, issues, or suggestions, please contact us at: support@maniss.dev
Changelog
Version 1.1 (25 December, 2024)
Added: Support for using other S3-compatible storage platforms.
Added: Ability to attach files to project discussion comments.
Added: Ability to attach files to project file comments.
Added: Image preview functionality in customer files.
Added: Custom hooks for extending functionality and enhancing file deletion processes.
Improved: File deletion workflow for S3 storage.
Fixed: Issues with downloading expenses and other files.
Version 1.0 (27 August, 2024)
Initial Release