NGALLERY['root']['storage']['s3']['credentials']['region'], 'version' => NGALLERY['root']['storage']['s3']['credentials']['version'], 'credentials' => [ 'key' => NGALLERY['root']['storage']['s3']['credentials']['key'], 'secret' => NGALLERY['root']['storage']['s3']['credentials']['secret'], ], 'endpoint' => NGALLERY['root']['storage']['s3']['domains']['gateway'], ]); $cstrong = True; $result = $s3->putObject([ 'Bucket' => NGALLERY['root']['storage']['s3']['credentials']['bucket'], 'Key' => $folder, 'SourceFile' => $file['tmp_name'] ]); return [ 'type' => explode('/', $file['type'])[0], 'src' => NGALLERY['root']['storage']['s3']['domains']['public'].'/'.$location . $filecdn, 'size' => self::human_filesize(filesize($file['tmp_name'])), 'name' => $file['name'] ]; } }