filestack/mixins/CommonMixin.php
public function sendDelete($handle, $api_key, $security)
    {
        $url = sprintf('%s/file/%s?key=%s',
            FilestackConfig::API_URL, $handle, $api_key);

        if ($security) {
            $url = $security->signUrl($url);
        }

        $response = $this->sendRequest('DELETE', $url);
        $status_code = $response->getStatusCode();

        // handle response
        if ($status_code !== 200) {
            throw new FilestackException($response->getBody(), $status_code);
        }

        return true;
    }
public function sendDelete($handle, $api_key, $security)
    {
        $url = sprintf('%s/file/%s?key=%s',
            FilestackConfig::API_URL, $handle, $api_key);

        if ($security) {
            $url = $security->signUrl($url);
        }

        $response = $this->sendRequest('DELETE', $url);
        $status_code = $response->getStatusCode();

        // handle response
        if ($status_code !== 200) {
            throw new FilestackException($response->getBody(), $status_code);
        }

        return true;
    }
public function sendDelete ( $ handle , $ api_key , $ security ) { $ url = sprintf ( '%s/file/%s?key=%s' , FilestackConfig :: API_URL , $ handle , $ api_key ) ; if ( $ security ) { $ url = $ security -> signUrl ( $ url ) ; } $ response = $ this -> sendRequest ( 'DELETE' , $ url ) ; $ status_code = $ response -> getStatusCode ( ) ; // handle response if ( $ status_code !== 200 ) { throw new FilestackException ( $ response -> getBody ( ) , $ status_code ) ; } return true ; }
Delete a file from cloud storage

@param string            $handle         Filestack file handle to delete
@param string            $api_key        Filestack API Key
@param FilestackSecurity $security       Filestack security object is
required for this call

@throws FilestackException   if API call fails, e.g 404 file not found

@return bool (true = delete success, false = failed)
Delete a file from cloud storage