{"record":{"id":"373ee28966500558","repo":"laravel/framework","slug":"this-driver-does-not-support-creating-temporary-up","errorCode":null,"errorMessage":"This driver does not support creating temporary upload URLs.","messagePattern":"This driver does not support creating temporary upload URLs\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/Illuminate/Filesystem/FilesystemAdapter.php","lineNumber":908,"sourceCode":"     * @param  \\DateTimeInterface  $expiration\n     * @param  array  $options\n     * @return array\n     *\n     * @throws \\RuntimeException\n     */\n    public function temporaryUploadUrl($path, $expiration, array $options = [])\n    {\n        if (method_exists($this->adapter, 'temporaryUploadUrl')) {\n            return $this->adapter->temporaryUploadUrl($path, $expiration, $options);\n        }\n\n        if ($this->temporaryUploadUrlCallback) {\n            return $this->temporaryUploadUrlCallback->bindTo($this, static::class)(\n                $path, $expiration, $options\n            );\n        }\n\n        throw new RuntimeException('This driver does not support creating temporary upload URLs.');\n    }\n\n    /**\n     * Concatenate a path to a URL.\n     *\n     * @param  string  $url\n     * @param  string  $path\n     * @return string\n     */\n    protected function concatPathToUrl($url, $path)\n    {\n        return rtrim($url, '/').'/'.ltrim($path, '/');\n    }\n\n    /**\n     * Replace the scheme, host and port of the given UriInterface with values from the given URL.\n     *\n     * @param  \\Psr\\Http\\Message\\UriInterface  $uri","sourceCodeStart":890,"sourceCodeEnd":926,"githubUrl":"https://github.com/laravel/framework/blob/e0f6eb3518ac29fbbca8529e97d0df7fc9f24481/src/Illuminate/Filesystem/FilesystemAdapter.php#L890-L926","documentation":"Thrown by FilesystemAdapter::temporaryUploadUrl() when the adapter has no temporaryUploadUrl() method and no temporaryUploadUrlCallback is set. Upload URLs let a client PUT/POST directly to cloud storage; only some drivers (S3, GCS via SDK) support them.","triggerScenarios":"Calling Storage::disk($name)->temporaryUploadUrl($path, $expiration, $options) on a disk whose adapter does not implement direct upload URL generation (local, FTP, custom without the method).","commonSituations":"Building a direct-to-S3 upload feature but the disk resolves to local in dev; SDK adapter that does not implement the method; calling on a disk that should use a signed POST policy instead.","solutions":["Use an S3 (or compatible) disk whose adapter implements temporaryUploadUrl().","Register a generator: Storage::disk($name)->buildTemporaryUploadUrlsUsing(fn ($path, $expiration, $options) => [...]).","Fall back to server-side upload via put() if direct upload is not required.","Confirm league/flysystem-aws-s3-v3 (or equivalent) is installed at a version exposing the method."],"exampleFix":"// before\n[$url, $headers] = Storage::disk('local')->temporaryUploadUrl($path, now()->addMinutes(5));\n\n// after\n[$url, $headers] = Storage::disk('s3')->temporaryUploadUrl($path, now()->addMinutes(5));","handlingStrategy":"fallback","validationCode":"if (! method_exists(Storage::disk($name)->getAdapter(), 'temporaryUploadUrl')) {\n    throw new RuntimeException(\"Disk [{$name}] cannot create temporary upload URLs.\");\n}","typeGuard":"function diskSupportsTemporaryUploadUrl(string $name): bool {\n    return method_exists(Storage::disk($name)->getAdapter(), 'temporaryUploadUrl');\n}","tryCatchPattern":"try {\n    [$url, $headers] = Storage::disk($name)->temporaryUploadUrl($path, $expiration);\n} catch (\\RuntimeException $e) {\n    // fall back to server-side upload\n    Storage::disk($name)->put($path, $uploadedFile->getContent());\n}","preventionTips":["Use an S3-compatible disk for direct uploads.","Register buildTemporaryUploadUrlsUsing() when needed.","Fall back to server-side put() when direct upload is unavailable.","Verify the adapter package exposes temporaryUploadUrl()."],"tags":["filesystem","upload","presigned","s3","driver"],"backgroundTag":null,"analyzedSha":"e0f6eb3518ac29fbbca8529e97d0df7fc9f24481","analyzedAt":"2026-08-11T20:52:37.562Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}