Sanity.upload_asset
You're seeing just the function
upload_asset
, go back to Sanity module for more information.
Specs
Generates a request for the asset endpoint.
Options
:asset_type
- Either:image
or:file
. The default value is:image
.:content_type
- Optionalcontent-type
header. It appears that Sanity is able to infer image types.
Query params
Sanity doesn't document the query params very well at this time, but the Sanity Javascript client lists several possible query params:
label
- Labeltitle
- Titledescription
- Descriptionfilename
- Original filenamemeta
- ???creditLine
- The credit to person(s) and/or organization(s) required by the supplier of the image to be used when published