Unable to upload torrent file by cURL #7137

Closed
opened 2026-02-21 18:48:06 -05:00 by deekerman · 1 comment
Owner

Originally created by @bearx3f on GitHub (Apr 12, 2018).

qBittorrent version and Operating System

4.0.4 Ubuntu 16.04

If on linux, libtorrent and Qt version

from ppa:qbittorrent-team

What is the problem

Unable to upload torrent by curl

What is the expected behavior

Successfully upload

Steps to reproduce

curl -i \
   -H 'Referer: http://192.168.2.90:8888/upload.html' \
   -H 'User-Agent: Fiddler' \
   -H 'Cookie: SID=9P++HOw8D22KgZRqrl+5qrFL8eGR4++W' \
   --data 'torrents=@a.torrent&root_folder=true' \
   http://192.168.2.90:8888/command/upload
Originally created by @bearx3f on GitHub (Apr 12, 2018). ### qBittorrent version and Operating System 4.0.4 Ubuntu 16.04 ### If on linux, libtorrent and Qt version from ppa:qbittorrent-team ### What is the problem Unable to upload torrent by curl ### What is the expected behavior Successfully upload ### Steps to reproduce ``` curl -i \ -H 'Referer: http://192.168.2.90:8888/upload.html' \ -H 'User-Agent: Fiddler' \ -H 'Cookie: SID=9P++HOw8D22KgZRqrl+5qrFL8eGR4++W' \ --data 'torrents=@a.torrent&root_folder=true' \ http://192.168.2.90:8888/command/upload ```
deekerman 2026-02-21 18:48:06 -05:00
  • closed this issue
  • added the
    WebUI
    label
Author
Owner

@glassez commented on GitHub (Apr 20, 2018):

You should upload files using "multipart/form-data", e.g.:

curl -i \
   -H 'Referer: http://192.168.2.90:8888/upload.html' \
   -H 'User-Agent: Fiddler' \
   -H 'Cookie: SID=9P++HOw8D22KgZRqrl+5qrFL8eGR4++W' \
   -F 'torrents=@a.torrent' -F 'root_folder=true' \
   http://192.168.2.90:8888/command/upload
@glassez commented on GitHub (Apr 20, 2018): You should upload files using "multipart/form-data", e.g.: ``` curl -i \ -H 'Referer: http://192.168.2.90:8888/upload.html' \ -H 'User-Agent: Fiddler' \ -H 'Cookie: SID=9P++HOw8D22KgZRqrl+5qrFL8eGR4++W' \ -F 'torrents=@a.torrent' -F 'root_folder=true' \ http://192.168.2.90:8888/command/upload ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#7137
No description provided.