Ant-Media-Server icon indicating copy to clipboard operation
Ant-Media-Server copied to clipboard

Not able to upload VoD files using REST API

Open armanism24 opened this issue 9 months ago • 0 comments

Short description

I wanted to add files via REST API and the video file is already on the server on this path "/home/user/videos/output_with_audio.mp4" but it is giving me an error HTTP Status 405 – Method Not Allowed

curl -k -X POST "http://localhost:5080/LiveApp/rest/v2/vods"
-H "accept: application/json"
-H "Content-Type: multipart/form-data"
-F "file=@/home/user/videos/output_with_audio.mp4"

I have even tried cURL Command with Authentication

curl -u your_username:your_password -X POST "http://localhost:5080/LiveApp/rest/v2/vods"
-H "accept: application/json"
-H "Content-Type: multipart/form-data"
-F "file=@/home/user/videos/output_with_audio.mp4"

But this is still not working.

Environment

  • Operating system and version: Ubuntu 22.04.4 LTS
  • Java version: openjdk version "17.0.10"
  • Ant Media Server version: Community Edition 2.9.0 20240405_1758
  • Browser name and version: Chrome Version 124.0.6367.158

Logs

Check the Logs

armanism24 avatar May 15 '24 01:05 armanism24