Repository navigation
Unable to set svg Content-Type #129
Description
Activity
Just to confirm we're looking at the same thing, what version of gcloud-node are you running?
@samdaltonmaag there is an example in the storage regression test, the key should be
contentType. You can find a complete description of Cloud Storage objects here.Small thing: it's actually
contentType, notContentType.The bucket write functionality has changed since 0.3.0, so keep that in mind when looking at the repo's tests & docs.
@silvolu Can we put out a
0.4.0before the weekend?Ah yes, it's working with that property name. I'm using 0.3.0.
Appreciate the help.@stephenplusplus yeah, but the way you write metadata hasn't changed ;-)
- addedapi: datastoreIssues related to the Datastore API.Issues related to the Datastore API.api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.and removedapi: datastoreIssues related to the Datastore API.Issues related to the Datastore API.
on Feb 2, 2015 Could this be documented a bit clearer please? I reached this issue because I also couldn't find in the docs how to properly write the
Content-Typemeta data property, and tried to write it as:let stream = gcsFile.createWriteStream({ metaData: { 'Content-Type': file.mimetype } });
Would be nice if this was documented, or a link to relevant documentation provided, somewhere here:
We do show setting metadata in an example. Doesn't say much that you didn't see it, though! Could you contribute a PR with what you would have found helpful?
If you can send me the link to the page where the meta data is shown in an example, then yes I could add a link to that page in the documentation.
It's in the example for createWriteStream under "Uploading a File with Metadata"
Ah, there it is. Yes, a link in the table at the
metadataproperty to that example would be great. I'd create a PR for this, but not sure what repository/files I should be looking at.56 remaining items
- added a commit that references this issue
on Mar 17, 2026 - added a commit that references this issue
on Mar 18, 2026 - added a commit that references this issue
on Mar 27, 2026
Hi,
SVGs that I upload to my bucket are being served as text/plain. I suspect that the mime type detection has failed, so I'm trying to set it manually. Here's an example metadata object I use during upload:
There doesn't seem to be any documentation on how to set the content type, so any help is appreciated.
Cheers