---
name: "getPetUploadSign"
mode: "api"
versionRequirements:
  - { name: "@ray-js/ray", version: "1.6.27" }
title: "getPetUploadSign - Obtain signature for pet document upload."
---

## getPetUploadSign

> [VERSION] @ray-js/ray >= 1.6.27

### Description

Get upload signature for pet-related files

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `GetPetUploadSign` | Yes | Request parameters: bizType business type (e.g., pet, petFeature, temp), fileName file name including extension |

### Return Value

Type: `Promise<GetPetUploadSignResult>`

Promise that resolves to the objectKey, url, and headers required for upload

##### GetPetUploadSignResult

| Property | Type | Description |
| --- | --- | --- |
| `objectKey` | `string` | File objectKey (generated in the cloud per rules) |
| `url` | `string` | Upload URL |
| `headers` | `{ [key: string]: any }` | Upload headers |

##### GetPetUploadSignResult.headers properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |


### Referenced Types

##### `type` GetPetUploadSign

| Property | Type | Description |
| --- | --- | --- |
| `bizType` | `string` | Business type: pet - pet avatar, petFeature - pet feature, temp - temporary file, analyze food composition |
| `fileName` | `string` | File name with extension, e.g., xxx.png |


### Examples

#### Request example

```typescript
import { getPetUploadSign } from '@ray-js/ray';

getPetUploadSign({
  bizType: 'pet',
  fileName: 'test.png',
});
```

#### Response example

```json
{
  "objectKey": "xxx",
  "url": "xxxx",
  "headers": {}
}
```
