Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7921017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:25:51+00:00 2026-06-03T16:25:51+00:00

I am trying to post a sound to echo nest for file analysis. The

  • 0

I am trying to post a sound to echo nest for file analysis. The POST method is no different than any other method, and I believe it’s not echonest dependent.

Here is the documentation. I need the “upload” part.

http://developer.echonest.com/docs/v4/track.html

NSURLRequest *request = [self multipartFormRequestWithMethod:@"POST" path:[NSString stringWithFormat:@"track/upload", self.apiKey] parameters:dictionary constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {

    [formData appendPartWithFileData:data name:@"track" fileName:[path lastPathComponent] mimeType:@"multipart/form-data"];
}];
AFURLConnectionOperation *operation = [self HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *operation, id responseObject) {
    NSLog(@"done");
    NSLog(@"response: %@", operation.responseString);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    NSLog(@"error: %@", error.description);
    NSLog(@"response: %@", operation.responseString);
    NSLog(@"headers: %@", operation.request.allHTTPHeaderFields.description);
    NSLog(@"operation url: %@", operation.request.URL.absoluteString);
}];

However, I have problems. Here is my response:

 {"response": {"status": {"version": "4.2", "code": 4, "message": "track - Missing Parameter: track or url is required with a POST content-type of \"application/x-www-form-urlencoded\" or \"multipart/form-data\""}}}

I thought I have already given the “track” parameter to be the data I initialized. Can anyone help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:25:54+00:00Added an answer on June 3, 2026 at 4:25 pm

    I experienced same problem few weeks ago. And here is what i found.
    AFNetworking makes slightly wrong multipart/form-data request.

    In AFHTTPClient.m file,

    static inline NSString * AFMultipartFormFinalBoundary() {
        return [NSString stringWithFormat:@"%@--%@--%@%@", kAFMultipartFormCRLF, kAFMultipartFormBoundary, kAFMultipartFormCRLF, kAFMultipartFormCRLF];
    }
    

    They put kAFMultipartFormCRLF twice at the end of final boundary of a request.
    But Echonest only except request with one CRLF at the end of multipart/form-data post request.
    I don’t know which one is exactly the righteous way in terms of HTTP protocol standard, but if you modify that code line (remove a kAFMultipartFormCRLF), i think your code would work well.

    FYI, while writing this answer, I explored current AFNetworking Git repo, and found out that this defect has been fixed just 5 days ago. So i guess you can just use latest source code to fix the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying post a javascript array using jquery $.post method to php and use
The MediaPlayer.GetVisualizationData method does not work for Windows Phone 7, so I'm trying to
I'm trying to get the $_POST value from a previous page. <form method=POST> <input
I'm trying POST a check-in request in Google Places API. The way they described
Im trying to post to a Fanpage wall as the Fanpage it self So
I'm trying to post to the login form of an application on another subdomain
I'm trying to POST a http request using ajax, but getting a response from
I'm trying to post to a webpage using WebClient in C#. Somehow the parameters
I am trying to post a multi-part form using httplib, url is hosted on
So i'm trying to POST something to a webserver. System.Net.HttpWebRequest EventReq = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(url); System.String

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.