Hello.
I'd like to download a file as a name. I've seen this on Stack:
The content-disposition of a particular object is part of its metadata and can be permanently set. If you always want a specific file to be downloaded with a specific name, you can just permanently set the content-disposition metadata for the object.
But there's no working example. In the SDK docs we get an example of how to possibly set metadata, but that doesn't have working examples either:
$storage = new StorageClient();
$bucket = $storage->bucket($bucketName);
$object = $bucket->object($objectName);
$object->update([
'metadata' => [
'keyToAddOrUpdate' => 'value',
]
]);
Can someone tell me how to permanently set the download name of a file? The key there could be content-disposition, contentDisposition. The value could be anything. We need less pages of docs and more code with this platform.