涉及规格:
openapi: '3.0.2'
info:
title: Video Storage Server API
version: '1.0'
servers:
- url: http://localhost:8080
paths:
/files/{fileid}:
get:
description: Download a video file by fileid.
parameters:
- in: path
name: fileid
required: true
schema:
type: string
responses:
'200':
description: OK
headers:
Content-Disposition:
schema:
type: string
content:
video/mp4: # foo.mp4
schema:
type: string
format: binary
video/mpeg: # bar.mpg
schema:
type: string
format: binary
我了解我需要让我的服务器响应一个带有文件ID的GET请求。 服务器存储视频。
从服务器返回的响应应该像用户可以在浏览器/Postman中播放的视频一样,还是应该是视频的字节数组?
即,响应应该是:
![Possible result 1](https://istack.dev59.com/Uaz7J.webp)
![Possible result 2](https://istack.dev59.com/be5Iq.webp)
我的“Content-Disposition”应该是什么?