OVHcloud Community

Welcome to your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Set content dispoisition for a temp URL? Iframe


#1

I’m trying to create a temp url where the content disposition is ‘inline’, so it doesn’t download the file but it actually gets displayed within an iframe.

I’ve tried this, but it is downloading the file instead:
$url = Storage::disk(‘ovh’)->temporaryUrl($path, now()->addMinutes(1), [
‘CONTENT_DISPOSITION’ => ‘inline’,
‘CONTENT_TYPE’ => ‘text/html’
]);

<iframe src="{{$url}}"></iframe>