Support-Forum
27.08.2014 14:50:37 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: 2014-06-12: We regrets the delay in replying the questions. But we have holiday time in germany.
So it is currently possible that we need a few days for the reply. We ask for your understanding.
 
   Home   Help Search Login Register  

Pages: [1]   Go Down
  Print  
Author Topic: Amazon S3 Support  (Read 3325 times)
0 Members and 1 Guest are viewing this topic.
water
Jr. Member
**
Offline Offline

Posts: 77


« on: 25.10.2011 17:12:26 »

Hello Arno. It will be great if you can integrate amazon S3 stores plugin into JDownloads? as it will decrease site load and will save us lots of bandwidth
Logged
progandy
Newbie
*
Offline Offline

Posts: 21


« Reply #1 on: 25.10.2011 23:50:48 »

This is a nice idea. Why not create a general API in 2.0 so that you can simply add new storage methods and choose them on a file/category basis. e.g. database storage, file system, amazon S3 (the service should support creation of time limited links, too) Wink
Logged
water
Jr. Member
**
Offline Offline

Posts: 77


« Reply #2 on: 02.11.2011 03:57:49 »

yeah will be great. Some other component are supporting S3 and other files hosting server
Logged
Arno
Administrator
***
Offline Offline

Posts: 9.689



WWW
« Reply #3 on: 02.11.2011 09:32:14 »

When anybody can send me a script sample to use amazon S3, i will seen what i can do.
Logged

Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions archive!
MDS
Newbie
*
Offline Offline

Posts: 30


WWW
« Reply #4 on: 02.11.2011 09:53:04 »

What happens when files are stored on Amazon servers is damaged?  Wink
Logged
MDS
Newbie
*
Offline Offline

Posts: 30


WWW
« Reply #5 on: 02.11.2011 10:01:38 »

I'm not sure, but maybe it will be useful for you?:

http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/

php-script to clean old files to Amazon S3:

Code:
<?php

/**
 * @example "s3cmd ls s3://bucket/path/to/dir/ | php this_file.php"
 */

define'NUM_DAYS'10 );

$stdin file'php://stdin'FILE_IGNORE_NEW_LINES );
$files = array();
for ( 
$i=0$len=count$stdin ); $i<$len$i++ ) {
# &#1087;&#1088;&#1086;&#1087;&#1091;&#1089;&#1082;&#1072;&#1077;&#1084; &#1087;&#1077;&#1088;&#1074;&#1091;&#1102; &#1089;&#1090;&#1088;&#1086;&#1082;&#1091;, &#1087;&#1086;&#1089;&#1082;&#1086;&#1083;&#1100;&#1082;&#1091; &#1074; &#1085;&#1077;&#1081; &#1089;&#1086;&#1076;&#1077;&#1088;&#1078;&#1080;&#1090;&#1089;&#1103; &#1090;&#1077;&#1082;&#1091;&#1097;&#1072;&#1103; &#1076;&#1080;&#1088;&#1077;&#1082;&#1090;&#1086;&#1088;&#1080;&#1103;
if ( $i == ) {
continue;
}

# 1 - &#1076;&#1072;&#1090;&#1072; &#1087;&#1086;&#1089;&#1083;&#1077;&#1076;&#1085;&#1077;&#1075;&#1086; &#1080;&#1079;&#1084;&#1077;&#1085;&#1077;&#1085;&#1080;&#1103;
# 2 - &#1088;&#1072;&#1079;&#1084;&#1077;&#1088; &#1074; &#1073;&#1072;&#1081;&#1090;&#1072;&#1093;
# 3 - &#1072;&#1076;&#1088;&#1077;&#1089; &#1074; &#1073;&#1091;&#1082;&#1077;&#1090;&#1077;
preg_match'#([\d]{4}-[\d]{2}-[\d]{2}\s[\d]{2}:[\d]{2})[\s]+([\d]+)[\s]+(s3://.*)#'$stdin$i ], $matches );

$matches[1] = strtotime$matches[1] );
$files[] = $matches;
}

$bestBefore time() - NUM_DAYS*86400;
foreach ( 
$files as $file ) {
if ( $file[1] < $bestBefore ) {
$command 's3cmd del ' str_replace' ''+'$file[3] );
`$command`;
}
}
Logged
Arno
Administrator
***
Offline Offline

Posts: 9.689



WWW
« Reply #6 on: 02.11.2011 12:52:15 »

Hi MDS,
many thanks for the link above. i hope we can use this class.  Grin
Logged

Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions archive!
MDS
Newbie
*
Offline Offline

Posts: 30


WWW
« Reply #7 on: 02.11.2011 13:58:37 »

Hi! I was glad to help!  Smiley
Logged
turminator
jD Translator
*
Offline Offline

Posts: 236


« Reply #8 on: 16.02.2012 09:48:49 »

This will be great and can save a lots of bandwith. Many thanks for this great project. Smiley
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

-->
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.24 seconds with 18 queries.