mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 15:13:29 +01:00
e5a230e0c7
* Adjustments for tests * Implement handling of temp downloading resources * Refactor paths * Refactors for file paths * Refactor paths * Add in S3 adapter * Refactor company Documment URL * Refactor for entity pdf performance * Refactors for invoice generation * Enhancements for emails invoices * Emails * Fixes for client portal queries
26 lines
467 B
PHP
26 lines
467 B
PHP
<?php
|
|
/**
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
*
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
*
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
*
|
|
* @license https://opensource.org/licenses/AAL
|
|
*/
|
|
|
|
namespace App\Utils;
|
|
|
|
class TempFile
|
|
{
|
|
|
|
public static function path($url) :string
|
|
{
|
|
|
|
$temp_path = tempnam(sys_get_temp_dir(), basename($url));
|
|
copy($url, $temp_path);
|
|
|
|
return $temp_path;
|
|
}
|
|
|
|
} |