getSongPresignedUrl($song); $localPath = $tmpDir . DIRECTORY_SEPARATOR . basename($song->storage_metadata->getPath()); File::copy($publicUrl, $localPath); return $localPath; } protected function generateStorageKey(string $filename, User $uploader): string { return sprintf('%s__%s__%s', $uploader->id, Str::lower(Ulid::generate()), $filename); } abstract public function getSongPresignedUrl(Song $song): string; }