Page 1 of 1

Amazon S3 Dir

PostPosted: August 2nd, 2011, 11:59 am
by drbyte
Hi Guys

Cris: Thank you for the code...still working on it

Jason: Is there any hack to the storage directory. We have about 300GB of files in the S2Member folder and we would like to use the Amazon S3 storage. As you might know, it will take ages to move all these file to amazon folders. So instead of doing that can we use both (the default s2m folder and amazon s3 buckets). For example, if we have a file called file.mp4 and we load it to an X amazon bucket, now when we link to that file using ?s2member_file_download=file.mp4 for example, first it will look if the files exists in the S2M folder, if not then it looks into the amazon s3 folder, once found it will play.

It's like using multiple storage directories in a network

Thank you

Re: Amazon S3 Dir

PostPosted: August 2nd, 2011, 11:34 pm
by Jason Caldwell
Thanks for the great question Sam.

No, right now it's one or the other. If you configure an Amazon S3 Bucket for s2Member to use, it will then expect all of your protected files to be inside the Bucket, and the local /s2member-files/ directory is ignored.

If you're in a pinch, you could try editing this file:
/s2member/includes/classes/files-in.inc.php
See: line #48 ( it should only take a couple lines of custom code to achieve what you want )

Re: Amazon S3 Dir

PostPosted: August 4th, 2011, 10:38 pm
by drbyte
Hi Jason

I looked at the code. Is there anyway I can have the storage directory points at another server? We have a separate storage servers that uses IP addresses. Those servers host our media files and to stream to the iPhone we need a progressive streaming option.

If possible, where to look for that code

Thank you

Note: ?s2member_file_download= is not being recognized by Android and the iPhone (html5 Only). I think the browser is stripping the (?, _, or =)

Re: Amazon S3 Dir

PostPosted: August 6th, 2011, 1:16 pm
by Jason Caldwell
Amazon S3, yes, but not to another remote server, sorry.
That being said, I'd like to try and solve the underlying issue that you're having.
Let's resume this conversation here please, I'm taking a look now:
viewtopic.php?f=4&t=14316#p30029

Re: Amazon S3 Dir

PostPosted: August 11th, 2011, 7:39 am
by drbyte
Hi Jason

Security Issue

Can you please hide/encrypt the Secret Key (Secret Access Key) in the s2Member File Download Options with your next release.

Thank you

Sam

Re: Amazon S3 Dir

PostPosted: August 15th, 2011, 7:35 pm
by Jason Caldwell
Yes, thank you!