# Python request to post a file to Upload manager?

**URL:** <https://discuss.dradis.com/t/python-request-to-post-a-file-to-upload-manager/788>\
**Category:** Community Edition\
**Created:** [February 10, 2021, 7:12pm UTC](https://discuss.dradis.com/t/python-request-to-post-a-file-to-upload-manager/788 "2021-02-10T19:12:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ned-Flanders](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/ned-flanders/32/221_2.png) [@Ned-Flanders](https://discuss.dradis.com/u/Ned-Flanders)\
**Post date:** [February 10, 2021, 7:12pm UTC](https://discuss.dradis.com/t/python-request-to-post-a-file-to-upload-manager/788/1 "2021-02-10T19:12:23Z")

</div>

I’m trying to post a file (.nessus) to the upload manager via python requests. I have seen dradis has api capability but doesn’t seem to have a upload manager endpoint. I tried doing a session post to the /upload/ page but I keep getting:

## undefined method `original\_filename’ for “\<\_io.BufferedReader name=‘Test\_scan\_llq19j.nessus’\>”:String

Is there something I’m forgetting to pass here or is it not possible?

---

<div class="post-metadata">

**Author:** ![rachkor](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/rachkor/32/51_2.png) [@rachkor](https://discuss.dradis.com/u/rachkor)\
**Post date:** [February 10, 2021, 7:29pm UTC](https://discuss.dradis.com/t/python-request-to-post-a-file-to-upload-manager/788/2 "2021-02-10T19:29:06Z")

</div>

Hey @Ned-Flanders, welcome! Unfortunately, you’re not missing anything, there isn’t currently the option to upload a file via the API. All the existing REST API endpoints are listed here: [API basics | Dradis Pro Help](https://dradis.com/support/guides/rest_api/). I’ll make sure that this feature request is added to our idea backlog to investigate adding in the future.

---

<div class="post-metadata">

**Author:** ![Ned-Flanders](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/ned-flanders/32/221_2.png) [@Ned-Flanders](https://discuss.dradis.com/u/Ned-Flanders)\
**Post date:** [February 15, 2021, 3:28pm UTC](https://discuss.dradis.com/t/python-request-to-post-a-file-to-upload-manager/788/3 "2021-02-15T15:28:59Z")

</div>

Hi @rachkor,

Thank you for the quick reply and the welcome

Do you know of anyway I could process a nessus file? From that link I can only see Dradis has end points for nodes and evidence but there doesn’t look to be a way to process a nessus file automatically?

---

<div class="post-metadata">

**Author:** ![etd](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/etd/32/5_2.png) [@etd](https://discuss.dradis.com/u/etd)\
**Post date:** [February 15, 2021, 4:28pm UTC](https://discuss.dradis.com/t/python-request-to-post-a-file-to-upload-manager/788/4 "2021-02-15T16:28:14Z")

</div>

How much access do you have to the Dradis instance? You can do what you need via a console task via the `dradis:plugins:nessus:upload` task:

> **[From Nessus output to custom report | Dradis Pro Help](https://dradis.com/support/guides/command_line/nessus_to_report.html)**
>
> Use this script example to automate the entire process of report generation from Nessus output, all with the command line.

---

<div class="post-metadata">

**Author:** ![Ned-Flanders](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/ned-flanders/32/221_2.png) [@Ned-Flanders](https://discuss.dradis.com/u/Ned-Flanders)\
**Post date:** [February 17, 2021, 2:17pm UTC](https://discuss.dradis.com/t/python-request-to-post-a-file-to-upload-manager/788/5 "2021-02-17T14:17:10Z")

</div>

Thanks for pointing this out, looks like it’s just what I want to do

I just have a question if this can be done on dradis ce? I’m not apposed to paying for dradis, I just want to make sure it works before I make the commitment

I don’t seem to have anything in /opt/ as that guide states about running as dradispro?

Thanks!

---

<div class="post-metadata">

**Author:** ![etd](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/etd/32/5_2.png) [@etd](https://discuss.dradis.com/u/etd)\
**Post date:** [February 17, 2021, 2:32pm UTC](https://discuss.dradis.com/t/python-request-to-post-a-file-to-upload-manager/788/6 "2021-02-17T14:32:43Z")

</div>

Hi @Ned-Flanders you can run the upload command, just get to the folder where you’ve cloned CE and run `$ bundle exec thor -T` to see a list of all the available tasks.
