Announcement

Collapse
No announcement yet.

Upload file with Postman

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upload file with Postman

    Hi there !

    I'm trying to upload file with the request "PUT". But this request only create file, and I want to put data.
    How can I do this ?

  • #2
    Do you have a screenshot of what you're doing with Postman?

    Make sure that you click on Binary and select the file you want to upload. If you only do a PUT with the filename, then it just creates an empty file. You need to send the contents of the file in the body as a binary stream.

    This is the same as using the -T option in curl. See the screenshot below which works:

    Postman 782015 103232 AM.jpg

    Comment


    • #3
      It works, thank you \o/

      But I have an other question

      How can I create new folder in the server from my computer ?

      For example, I want to put "myfile.txt" at /fs/mynewfolder/myfile.txt ...

      Comment


      • #4
        Interesting, looks like Postman doesn't support the MKCOL WebDAV verb that is the WebDAV standard for creating directories. I tried with Firefox and the RESTClient extension, but it doesn't support it either.

        Looks like you'll have to use curl for creating directories.

        Comment


        • #5
          Ok I have to use curl, then which commands I have to use ?
          The thing I don"t understand is what allows cURL ? Make http request ?

          Comment


          • #6
            Originally posted by BC_FR View Post
            Ok I have to use curl, then which commands I have to use ?
            The thing I don"t understand is what allows cURL ? Make http request ?
            Yes, curl makes http requests. Download the "xPico Wifi File System Web API.pdf" document in this post:
            http://forums.lantronix.com/showthread.php?t=1015

            It shows the four possible HTTP requests for the Filesystem (GET, PUT, MKCOL, and DELETE), and the curl examples of how to use them.

            Mariano

            Comment


            • #7
              Cool I understand now \o/

              Thank you

              Comment

              Working...
              X