Coder Social home page Coder Social logo

Comments (4)

maxtepkeev avatar maxtepkeev commented on July 27, 2024

Hi Jesse!

I can confirm this problem with requests 0.12.1, but I'm afraid there's nothing I can do, because Redmine wants files to be uploaded as a part of the request body with application/octet-stream header and requests library only supports this from 0.13.1 (see first entry in the changelog).

So if you need file uploads you have to upgrade from requests 0.12.1 to 0.13.1. Is it possible for you ? If not, I think I can write a file upload functionality using python's urllib if requests is lower then 0.13.1, let me know if you need this, but the easiest way is just to upgrade.

from python-redmine.

jesselang avatar jesselang commented on July 27, 2024

Thanks for the quick response, Max! I'm pretty sure I can upgrade from the Debian package to a recent stable version using pip. Let me try that and I'll be back in touch. Thanks!

from python-redmine.

jesselang avatar jesselang commented on July 27, 2024

I was able to install requests using pip, and file uploads work well now. Thank you for your help!

from python-redmine.

maxtepkeev avatar maxtepkeev commented on July 27, 2024

Cool.

Anyway, thanks for reporting this, when I have time I'll try to introduce a workaround using python's urllib for those who for some reason can't upgrade.

from python-redmine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.