Amazon S3 helps me to focus on innovating with data, rather than figuring out how to store it. Each file is stored and retrieved via a unique key which is stored on a DB table, together with its folder name (or associated object id) which fitted well in the document store structure. I am totally free from worrying about where the uploaded files are going to be stored and the safety on the hard-disc level.
Sample PHP code (Please contact me if you want a full copy):
if($s3->createFile($bucket, $key, $filePath, $contentType, $contentLength, $acl, $metadataArray, $md5))
{
if (!empty($focus->name))
{
$sql = "INSERT INTO .......";
$dbh->query($sql);
}
header("Location: index.php");
} else {
printError($s3->parsed_xml, $s3->responseCode);
}
Tuesday, 21 August 2007
Amazon S3 Makes My Document Management System Easier
Posted by Alex Zang at 11:33 pm
Labels: PHP, Sample Code, Web App
Subscribe to:
Post Comments (Atom)
2 comments:
Hi,
I am trying to do the same thing using sqlite3 and ZF. Could you please send me your code, it might help a lot?
Thanks
-Naved
iqbalnaved@gmail.com
I would like to see the full code too.
Post a Comment