This plugin integrates S3-compatible storage for Open Journal Systems (OJS) 3.4.0, supporting multiple providers including AWS S3, Wasabi, DigitalOcean Spaces, and other S3-compatible services. The plugin provides advanced cloud storage solutions with features like hybrid mode, fallback mechanisms, automatic synchronization, and intelligent file management.
- S3-Compatible Integration: Supports AWS S3, Wasabi, DigitalOcean Spaces, and custom endpoints.
- Hybrid Mode: Stores files both locally and on the cloud for redundancy.
- Fallback Mechanism: Automatically switches to local storage when cloud storage is unavailable.
- Media Library Sync: Synchronizes existing OJS files to the configured cloud storage bucket.
- Scheduled Cron Jobs: Schedules automated maintenance and cleanup tasks.
- Efficient File Management: Automatically and efficiently deletes orphaned and unused files, even from large buckets.
- Customizable Settings: A comprehensive and user-friendly settings interface with dynamic options.
- Real-time Sync: Optionally synchronizes files immediately upon upload.
- Fully translated into English and Vietnamese.
- SSL/HTTPS encryption for secure data transfer.
- Connection testing and health checks.
- Detailed access control management.
- OJS: 3.4.0 or newer
- PHP: 7.3+ or 8.0+
- PHP Extensions: curl, openssl, json, fileinfo
- Storage: An S3-compatible bucket with appropriate access permissions.
- Network: An active internet connection to access the storage service.
- Compress the entire
s3Storagedirectory (which now includes thevendordirectory) into a single ZIP file. - Log in to your OJS dashboard as an Administrator.
- Navigate to Settings > Website > Plugins > Upload A New Plugin.
- Upload the ZIP file you just created and follow the on-screen instructions.
- Navigate to Settings > Website > Plugins.
- Find the "S3 Storage Plugin" in the Generic Plugins list.
- Click Enable.
After placing the SDK in the correct location as described in Step 1:
# Install or upgrade the plugin
php lib/pkp/tools/installPluginVersion.php plugins/generic/s3Storage/version.xml
# Enable the plugin for a specific journal (replace a_journal_path with your journal's path)
php tools/plugin.php enable S3StoragePlugin a_journal_pathFor automated tasks (like cleanup and sync) to work, you need to configure a cron job on your server to execute the OJS scheduled tasks script.
Cron Job Command:
* * * * * php /path/to/your/ojs/tools/runScheduledTasks.phpThis command should be run frequently (e.g., every hour). The plugin will decide whether to execute its tasks based on your settings in the admin interface.
In the plugin's settings page, you can enable or disable cron jobs and select which actions (cleanup, sync) should be performed.
This error can occur when installing the plugin via the web interface if OJS cannot find the tar command on your server.
Solution:
- Open the
config.inc.phpfile in your OJS root directory. - Locate the
[cli]section. - Provide the correct path to your
tarexecutable. For example:tar = /bin/tar
For more details, see: OJS Services
When you upgrade your OJS version, some plugins may become incompatible. Always check the Plugin Gallery and the plugin's documentation before upgrading. Solution:
- Always back up your system before an upgrade.
- Upgrade plugins via the Plugin Gallery within OJS to ensure compatibility checks are performed.
- If installing manually, ensure you are using a plugin version that supports your OJS version. For more details, see: PKP Community Forum
We welcome all contributions! Please see CONTRIBUTING.md for details on how to contribute, report bugs, and for our code standards.
GNU General Public License v3.0
Important Note: This plugin requires a basic understanding of cloud storage and OJS administration. Always back up your data before installing or changing the configuration. For support, please create an issue on GitHub.