I am developing an App which uploads files i.e. images,pdfs,text documents to Amazon S3. I am able to upload the files using S3.php class.
I have to store two links to the file in the database , the first link is the link to view the file in the browser if it is an image or a pdf document. The second link is to download the file.
I am able to generate the URL for each of the file using :
$url = $s3->getAuthenticatedUrl($bucket,$uri,$expiry)
But clicking the URL starts downloading the file, also this URL has an expiry time. But I have to store the links in database for longer time. I also have to display the images and pdfs inside the browser, How can I generate the links. Kindly help...