Question

So, here's what I want to do:

I want to use TPYO's (Undesigned) Amazon S3 Class to get a file from my S3 Bucket, and download it. I'm having alot of trouble getting it to work.

I'm using this code, but it's not working for me for some reason:

    if ($s3->copyObject($bucketName, $filename, $bucketName, $filename, "public-read", array(), array("Content-Type" => "application/octet-stream", "Content-Disposition" => "attachment"))) {  
         // Successful
    } else {
        // Failed
    }

I tried using any other questions, but I couldn't manage to do it.

Was it helpful?

Solution

Ok,

I found a way of doing it. I basically dismissed the whole idea of using TPYO's S3 PHP class to download a file from my bucket server. So instead, what I did was I made my bucket's stream an octet-stream, and made any files accessible via URL.

Thanks, Tom.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top