laravel/framework · error · RuntimeException
This driver does not support creating temporary upload URLs.
Error message
This driver does not support creating temporary upload URLs.
What it means
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.
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.
Example fix
// before
[$url, $headers] = Storage::disk('local')->temporaryUploadUrl($path, now()->addMinutes(5));
// after
[$url, $headers] = Storage::disk('s3')->temporaryUploadUrl($path, now()->addMinutes(5)); Defensive patterns
Strategy: fallback
Validate before calling
if (! method_exists(Storage::disk($name)->getAdapter(), 'temporaryUploadUrl')) {
throw new RuntimeException("Disk [{$name}] cannot create temporary upload URLs.");
} Type guard
function diskSupportsTemporaryUploadUrl(string $name): bool {
return method_exists(Storage::disk($name)->getAdapter(), 'temporaryUploadUrl');
} Try / catch
try {
[$url, $headers] = Storage::disk($name)->temporaryUploadUrl($path, $expiration);
} catch (\RuntimeException $e) {
// fall back to server-side upload
Storage::disk($name)->put($path, $uploadedFile->getContent());
} Prevention
- 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().
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- This driver does not support creating temporary URLs.
- This driver does not support retrieving URLs.
- Disk [ ] does not have a configured driver.
- Driver [ ] is not supported.
- Scoped disk is missing "disk" configuration option.
AI-assisted analysis of laravel/framework@e0f6eb3518 (2026-08-11).
Data as JSON: /api/errors/373ee28966500558.
Report an issue: GitHub.
Appendix: source
Thrown at src/Illuminate/Filesystem/FilesystemAdapter.php:908
* @param \DateTimeInterface $expiration
* @param array $options
* @return array
*
* @throws \RuntimeException
*/
public function temporaryUploadUrl($path, $expiration, array $options = [])
{
if (method_exists($this->adapter, 'temporaryUploadUrl')) {
return $this->adapter->temporaryUploadUrl($path, $expiration, $options);
}
if ($this->temporaryUploadUrlCallback) {
return $this->temporaryUploadUrlCallback->bindTo($this, static::class)(
$path, $expiration, $options
);
}
throw new RuntimeException('This driver does not support creating temporary upload URLs.');
}
/**
* Concatenate a path to a URL.
*
* @param string $url
* @param string $path
* @return string
*/
protected function concatPathToUrl($url, $path)
{
return rtrim($url, '/').'/'.ltrim($path, '/');
}
/**
* Replace the scheme, host and port of the given UriInterface with values from the given URL.
*
* @param \Psr\Http\Message\UriInterface $uriView on GitHub (pinned to e0f6eb3518)