Giter Club home page Giter Club logo

Comments (3)

taf2 avatar taf2 commented on August 15, 2024

Oh that's actually, a valid error message. I believe you want f=Curl::PostField.content('name','sdf');

f=Curl::PostField.content('name','sdf');
irb(main):004:0* f.to_s
=> "name=sdf"
irb(main):005:0>

from curb.

wolframarnold avatar wolframarnold commented on August 15, 2024

Thanks, but what's the right way to do file upload then? It didn't seem to matter whether the 2nd argument is a valid filename or not. The docs say that the first argument should be the name of the field, the second should be the local filename and the optional third argument should be the name of the remote filename. Either the docs are incorrect, or the error message doesn't make sense.

from curb.

taf2 avatar taf2 commented on August 15, 2024

Wow, it was late last night. Yes you are totally right i can't see why PostField.file#to_s would not print out the name=filepath. There might be a use case I missed but I believe this change won't break anyone. fixed in commit: http://github.com/taf2/curb/commit/eed32d541d43a78d062055fb383df609b336e7ec

from curb.

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.