file('source_file'); $checksum = hash_file('sha256', $file->getRealPath()); $extension = strtolower($file->getClientOriginalExtension() ?: 'csv'); $path = 'ecommerce-finance/' . company_id() . '/' . Str::uuid() . '.' . $extension; Storage::disk('uploads')->putFileAs( dirname($path), $file, basename($path) ); return response()->json([ 'source_file' => $path, 'checksum' => $checksum, ], 201); } }