Josh Posted October 5 Share Posted October 5 I have never tried to do this. The system is detecting the files[0] part, and the "Hello!" contents, but the file name MyFile.txt is not being interpreted correctly. The docs say that files is supposed to be an array with objects that have a key for the filename and a value for the contents of the file. Do you see any problem? std::string options = "category=97&description=MyDescription&title=FileName&author=1&"; options += urlEncode("files[0].MyFile.txt") + "=" + urlEncode("Hello!"); auto j3 = InvisionPower::APIPost("/downloads/files/", token, options); Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
OneHitWonder Posted October 5 Share Posted October 5 Would something like the following work? urlEncode("files[0][FileName]") Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted October 5 Author Solution Share Posted October 5 The problem was that files is an object, not an array. So it is supposed to be like this: files[filename]=filecontents Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.