Uploading to Amazon S3
Posted: 18 November 2008 06:18 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  430
Joined  02-26-2008

Hi everyone…

I’m working on a site that has a lot of video.  I’m considering tying in Amazon S3 to the PUBLISH form.  Basically, a web form that would upload to that service.  I actually already have a prototype on my local install that would do this.

Now, here is where my lopsided PHP/server knowledge come into play…

Am I right in assuming that the size of the file that will be uploaded is still bound by the server’s PHP upload and memory limits?

I’m using this class for uploading to S3.

Profile
 
 
Posted: 19 November 2008 03:23 AM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7061
Joined  04-15-2006

Hi Arun,

I could be completely wrong on this but when I looked into Amazon S3 I’m pretty sure that there aren’t really any limits at all on size of file that can be uploaded to them. I saw a form on their developer site some time back which allowed you to upload as much as you wanted all at one time. This may have changed now though so I’m not totally sure but if you were to ask in their support forum I’m sure someone would know the correct answer there.

Would love to see this though if possible when you have it all working though.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 19 November 2008 07:37 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  10
Joined  02-24-2008

I think the current max upload size is 5 GB (which is probably fine for most uses).

Profile
 
 
Posted: 19 November 2008 07:58 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  430
Joined  02-26-2008

Hmm…thanks for the thoughts guys.  I’ve been reading up at the Amazon S3 forums, and I’m pretty sure now that my initial hunch was right.  My server would still be the one processing the upload.  It just saves it to another place.  So, I’m pretty sure that the upload_max_filesize setting sticks.  It not a limit imposed by Amazon, it’s just the capability of the uploading server.

I did a few tests with changing my PHP settings, and it seems like that is the case.

I’m thinking of a solution with coupling Amazon S3, Google Gears and EE for uploading large files.  I saw an extension yesterday in the Extension forums that used the new version of Google Gears to split large files into chunks and then process them.  Perhaps (and I have no idea if this is possible at all), I would be able to split a file, reassemble it on my server and then send it off to Amazon S3 and delete whatever local assets are left over. 

If nothing else, it’ll be a learning experience.  I’ll 100% be posting about this as I make any progress.

If anyone has any hints, tips or wants to double team this thing, I’d of course welcome the help.

Profile
 
 
Posted: 19 November 2008 08:55 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Total Posts:  7
Joined  02-05-2008

I think the only way you could bypass your server processing the request would be to use an approach referenced below, posting directly to S3 (the article doesn’t use PHP, but the concept could certainly be ported to PHP).  You may of course hit a brick wall if trying to integrate the approach with EE.

http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1434&categoryID=55

You may want to check out Amazon CloudFront for delivering the files to your user.

 Signature 

Jason Ferrell

Tallboy Creative
Design, Development and Strategy for the Web

Profile
 
 
Posted: 19 November 2008 09:17 AM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  430
Joined  02-26-2008

Jason, thank you very much for the reply.  I didn’t know that it was possible to process the upload through Amazon S3.

A little bit of searching brought me to this

On the surface, this looks very promising.  I’ll have to play around with it and see what I can come up with.

Awesome…it would be amazing, if I can get this to work.

Profile
 
 
Posted: 19 November 2008 10:04 AM   [ Ignore ]   [ # 6 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7061
Joined  04-15-2006

Yep, referencing my last post I thought that I had seen something where you completely bypassed your own server and you were able to upload as much as you liked to the S3 account. Not sure how easy that would be to integrate but would be an excellent addition if it could be figured out.

I wish I had the brains to be able to help you out on this one but alas I’m still stuck on smaller plugins at the moment wink

Hope you do get something together though, would love to see what you come up with.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 19 November 2008 10:25 AM   [ Ignore ]   [ # 7 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  430
Joined  02-26-2008

Come on, Mark.  You can’t help me out every other time and then not do it this time.  Grab that PHP manual! :-p I jest, of course. 

Hopefully, I can come with something.  Apparently, copying and pasting a link into EE is too complicated for this client (that’s the current workflow)  rolleyes

Profile
 
 
Posted: 19 November 2008 10:35 AM   [ Ignore ]   [ # 8 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7061
Joined  04-15-2006

I apologise. I really am naughty aren’t I?

I suppose I’ll just have to have even less sleep to help out on this one then wink

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 19 November 2008 11:40 AM   [ Ignore ]   [ # 9 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  430
Joined  02-26-2008
Mark Bowen - 19 November 2008 10:35 AM

I apologise. I really am naughty aren’t I?

I suppose I’ll just have to have even less sleep to help out on this one then wink

That’s the spirit!  tongue rolleye

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66389 Total Logged-in Users: 39
Total Topics: 84714 Total Anonymous Users: 20
Total Replies: 454693 Total Guests: 193
Total Posts: 539407    
Members ( View Memberlist )