Step 4. Upload Zend Framework to your Webserver Root Directory
Step 5. Synchronize with Tools like "Transmit" your Webserver Folder store_attachment with your AWS Bucket.
Sample copy this from Webserver:
store_attachment/2/59.attach
store_attachment/3/44.attach
store_attachment/3/44.thumb
...
To your S3 Bucket
YourBucket/2/59.attach
YourBucket/3/44.attach
YourBucket/3/44.thumb
Step 6. After Synchronize you can Remove all or only your big Files in your store_attachment Folder.
Step 7. Synchronize every day or week or not.
The attachment.php download and view your pictures and files from your S3 and when not found on this, download the File from your Webserver.
Its Simple. Its Work.
Alternative:
You can rename my attachment.php to download.php and modifier with Jquery in the headinclude template:
<script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/jquery/jquery-1.6.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var strNewString = $('body').html().replace(/\attachment.php/g,'download.php');
$('body').html(strNewString);
});
</script>
In this Case rename in your new download.php
Row 36: #attachment\.php to #download\.php
Row 189: 'attachment.php?' to 'download.php?'
For more Comfortable Uploads i have create a Java App.
With Java App "VBS3Uploader" you can upload many big Files to your S3 Account. The App Save the File Reference in your VB Board Database. After Upload you can with Data Manager select the File in your Article und Posts. The App is designed for Webmaster and her Mods.
App Features:
-Test your Connections.
-Upload Files with 1GB size and more
-Debug Windows
-Progressbar
-Configure your Properties( AWS Keys, Bucket, VB UserID and DB Password)
-All relevant Keys and Passwords are encrypt saved
Please not forget:
Change your Properties after First Start the App.
Please Change the Database Connection in the hibernate.cfg.xml.
1. Unpack the jasypt-1.8-dist.zip.
2. Go with terminal to jasypt-1.8/bin Folder.
3. Encrypt your Database Password with call enrypt.bat or encrypt.sh
"encrypt.bat input="YOUR-DATABASE-PASSWORD" password=YOUR-ENCRYPTION-PASSWORD algorithm=PBEWithMD5AndDES"
4. Copy the Result in your hibernate.cfg.xml:
<property name="hibernate.connection.password">ENC(your result from encrypt)</property>
5. Change the values
<property name="hibernate.connection.url">jdbc:mysql://your server url:3306/your databasename</property>
<property name="hibernate.connection.username">your databaseuser</property>
Run the App: java -jar VBS3Uploader.jar
It's a First Version. Please contact me when you find Bugs or for support. oxoxo@gamesattack.me
This looks very good, it might be just what I need.
Quote:
Originally Posted by pelican
i think we need some coding to automatically synchronize (cron job) server attachment to S3 and then remove the attachments in the server.
These look like good 3rd party (open source) tools for synchronising to S3 through a cron job and I believe one of them can delete files from your server: http://s3tools.org/s3cmd and http://s3tools.org/s3cmd-sync