PHP code example of unisharp / s3-presigned

1. Go to this page and download the library: Download unisharp/s3-presigned library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

unisharp / s3-presigned example snippets


/*
 * @return string
 */
public function getSimpleUploadUrl($key, $minutes = 10, array $options = [], $guzzle = false)

/*
 * @return array('endpoint', 'inputs')
 */
public function getUploadForm($minutes = 10, array $policies = [], array $defaults = [])

/*
 * @return array
 */
public function listObjects($directory = '', $recursive = false)

/*
 * @return boolean
 */
public function deleteObject($key)

/*
 * @return string
 */
public function getBaseUri()

/*
 * @return this
 */
public function setPrefix($prefix)

/*
 * @return string
 */
public function getPrefix()

/*
 * @return this
 */
public function setBucket($bucket)

/*
 * @return string
 */
public function getBucket()

/*
 * @return Aws\S3\S3Client
 */
public function getClient()

'S3Presigned' => Unisharp\S3\Presigned\Facades\S3Presigned::class,