Join BoxWorks in San Francisco Nov 12-13! Keynotes, product demos, and Box Master Classes. Reserve your spot!

file upload failed. (API upload did not contain a file part)

New post

Comments

6 comments

  • Alex Novotny

    May I see the code you are running? 

    Is there anything else you can share on what the differences are between when it works and when it doesn't? 

    0
    Comment actions Permalink
  • BAE HYUNKU (BAEHYUNKU)

    I found the reason.

    In header, "Content-Type: application/json;charset=UTF-8" is invalid.

    invalid content type cuased intermittent server response(400)

    remove invalid content type solve the problem.

    cc. thx, for asking Alex.

    0
    Comment actions Permalink
  • Michael Gedigk

    Bae, can you show me an example of the JSON body, i'm having the same problem

    0
    Comment actions Permalink
  • BAE HYUNKU (BAEHYUNKU)

    It's 3month ago test. so I dont have example.

    but it's a plain file request, not complex.

    and above i said, my problem is invalid header value.

    AS-IS : Content-Type: application/json;charset=UTF-8

    TO-BE : Content-Type: application/json;

    in my case, that's all.

    I hope your issue will be resovled.

    0
    Comment actions Permalink
  • Michael Gedigk
    ---1234567890 
    Content-Disposition: form-data; name="attributes" Content-Type: application/json 
    {    
    "name":"test upload.txt",     
    "parent":{        
    "id":"182678998283"             
    }, }
    ---1234567890 
    Content-Disposition: form-data; name="file"; filename="test upload.txt" 
    Content-Type: text/plain  
    VGhpcyBpcyBhIHRlc3Q= 
    ---1234567890" 
    0
    Comment actions Permalink
  • Michael Gedigk

    Still not working.

     

    0
    Comment actions Permalink

Post is closed for comments.