PHP Classes

File: src/helpers/functions.php

Recommend this page to a friend!
  Classes of Ogbemudia Osayawe   PHP AWS S3 Client SDK Wrapper   src/helpers/functions.php   Download  
File: src/helpers/functions.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP AWS S3 Client SDK Wrapper
Manage files stored in the AWS S3 cloud storage
Author: By
Last change:
Date: 2 years ago
Size: 598 bytes
 

Contents

Class file image Download
<?php

function basePath()
{
    return
realpath(__DIR__ . '/../../');
}

/**
 * @deprecated
 * @return mixed
 */
function guestFileExtension()
{
   
$key = array_keys($_FILES)[0];
   
$filename = $_FILES[$key]['name'];
    return
pathinfo($filename, PATHINFO_EXTENSION);
}

/**
 * @deprecated
 * @return mixed
 */
function getFileTmpLocation()
{
   
$key = array_keys($_FILES)[0];
    return
$_FILES[$key]['tmp_name'];
}

/**
 * @deprecated
 * @return mixed
 */
function getObjectName($object_key)
{
   
$keys = explode('/', $object_key);
    return
$keys[1] !== "" ? basename($object_key) : "";
}