Skip to content

1.5) File Request Sample

Jong1 edited this page Nov 4, 2023 · 1 revision

주의사항

Warning

모든 Request, Response가 존재하지 않을 수 있습니다

이미지 리스트 등록

Request Example

curl --location 'http://localhost:8080/file/images' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAzNTQ1LCJleHAiOjE2OTc2Mzk1NDUsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.RjqfcRyI9JzgEDqOxWC9xk_ZBns9skxns3V0F9qdLpjl7mTyjl5CyWjQ5xa7MueXYgq2V3TFTiYqaBttizAIeA' \
--form 'naverObjectStorageUsageType="ARTICLE"' \
--form 'images=@"/Users/kimjongwon/Downloads/OrientalUtnityLogo Original.png"' \
--form 'images=@"/Users/kimjongwon/Downloads/HookKiller (1).png"' \
--form 'images=@"/Users/kimjongwon/Downloads/HookKiller.png"'

Response Example

[
  {
    "filePath": "local/article/2023/10/18/f2d103d6-4e7e-405b-9589-3aee79dd4807.png",
    "usageType": "ARTICLE"
  },
  {
    "filePath": "local/article/2023/10/18/405c08a7-90ea-4518-abdf-4db342da8d79.png",
    "usageType": "ARTICLE"
  },
  {
    "filePath": "local/article/2023/10/18/8fff5db1-13b6-4e28-a246-e3f9f5b58ff5.png",
    "usageType": "ARTICLE"
  }
]

이미지 등록

Request Example

curl --location 'http://localhost:8080/file/image' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAzNTQ1LCJleHAiOjE2OTc2Mzk1NDUsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.RjqfcRyI9JzgEDqOxWC9xk_ZBns9skxns3V0F9qdLpjl7mTyjl5CyWjQ5xa7MueXYgq2V3TFTiYqaBttizAIeA' \
--form 'naverObjectStorageUsageType="ARTICLE"' \
--form 'image=@"/Users/kimjongwon/Downloads/OrientalUtnityLogo Original.png"'

Response Example

{
  "filePath": "local/article/2023/10/18/17fe98ec-7fca-46e4-9512-d83e868e6f76.png",
  "usageType": "ARTICLE"
}