diff --git a/src/fields/Assets.php b/src/fields/Assets.php index ece9d049756..27edd749304 100644 --- a/src/fields/Assets.php +++ b/src/fields/Assets.php @@ -715,8 +715,14 @@ public function getInputSources(?ElementInterface $element = null): array|string $sources = array_merge($this->sources); } else { $sources = []; + [$tempVolume] = Craft::$app->getAssets()->getTempVolumeAndSubpath(); + $tempVolumeKey = $tempVolume ? "volume:$tempVolume->uid" : null; + foreach (Craft::$app->getElementSources()->getSources(Asset::class) as $source) { - if ($source['type'] !== ElementSources::TYPE_HEADING) { + if ( + $source['type'] !== ElementSources::TYPE_HEADING && + $source['key'] !== $tempVolumeKey + ) { $sources[] = $source['key']; } }