2 Attachment

Get a list of attachments

POST api/attachment/list

Request Body

NameTypeDescription

attach_ids

array

Attachment ID Collection

Field

Type

Description

status

boolean

(1) Access is successful

data

array

back to attachment

Attachment Upload

GET api/attachment/upload

Request Body

NameTypeDescription

name

string

File name If this value is passed in, use this value as the file name, otherwise generate a name based on the uploaded file

Filedata

file

The value of the file upload name is fixed as Filedata, and the uploaded file information is $_FILES['Filedata']

attachment_table

string

Association table name, optional, if this value is passed in, this attachment will be associated with the corresponding table

chunks

int

The number of all uploaded slices

chunk

int

The index of the currently uploaded slice, starting from 0

Field

Type

Description

status

boolean

(1) uploaded successfully

data

array

Returns the attachment id and name

Get Attachments

GET api/attachment/index/{attachmentId}

Path Parameters

NameTypeDescription

encrypt

string

Fixed value: 0

attachment_id

string

Attachment ID

operate

string

The fixed value is: download

Field

Type

Description

status

boolean

(1) Access is successful

attachment

resource

back to attachment

Last updated