debug
This commit is contained in:
@@ -69,9 +69,11 @@ function tempFileInfo(string $filePath): array
|
|||||||
function tempFileExists(string $dir, string $name, string $extension = '', string $part = ''): string
|
function tempFileExists(string $dir, string $name, string $extension = '', string $part = ''): string
|
||||||
{
|
{
|
||||||
$filename = constructTempFileName($dir, $name, $extension, $part);
|
$filename = constructTempFileName($dir, $name, $extension, $part);
|
||||||
Log::Info($filename);
|
|
||||||
|
$exists = file_exists($filename);
|
||||||
return file_exists($filename);
|
Log::Info($filename . ' ' . ($exists ? 'true' : 'false'));
|
||||||
|
|
||||||
|
return $exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use Illuminate\Http\JsonResponse;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\UploadedFile;
|
use Illuminate\Http\UploadedFile;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Laravel\Sanctum\PersonalAccessToken;
|
use Laravel\Sanctum\PersonalAccessToken;
|
||||||
|
|
||||||
class MediaController extends ApiController
|
class MediaController extends ApiController
|
||||||
@@ -113,6 +114,9 @@ class MediaController extends ApiController
|
|||||||
|
|
||||||
$mediaItem = $request->user()->media()->create($request->except(['file','transform']));
|
$mediaItem = $request->user()->media()->create($request->except(['file','transform']));
|
||||||
|
|
||||||
|
Log::info($mediaItem->name);
|
||||||
|
Log::info(pathinfo($mediaItem->name, PATHINFO_EXTENSION));
|
||||||
|
|
||||||
$temporaryFilePath = generateTempFilePath(pathinfo($mediaItem->name, PATHINFO_EXTENSION), $request->get('chunk', ''));
|
$temporaryFilePath = generateTempFilePath(pathinfo($mediaItem->name, PATHINFO_EXTENSION), $request->get('chunk', ''));
|
||||||
copy($file->path(), $temporaryFilePath);
|
copy($file->path(), $temporaryFilePath);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user