Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Nov 29, 2021. It is now read-only.

Conversation

@richmouritsen
Copy link

@richmouritsen richmouritsen commented May 17, 2016

I was trying to use the chunked upload using the StartChunkedUpload, AppendChunkedUpload, and CommitChunkedUpload methods, but it wasn't working. I wasn't getting an exception on the initial StartChunkedUpload call, but the ChunkUpload object coming back was empty, which eventually led to a null reference exception.

Using Fiddler, I looked at the request and found this call on the Create:

PUT /1/chunked_upload?oauth_consumer_key=%7Boauth_consumer_key%7D&oauth_nonce=%7Boauth_nonce%7D&oauth_token=%7Boauth_token%7D&oauth_timestamp=%7Boauth_timestamp%7D&oauth_signature=%7Boauth_signature%7D&oauth_signature_method=%7Boauth_signature_method%7D&oauth_version=%7Boauth_version%7D HTTP/1.1

which resulted in this response:

{"error": "Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."}

I looked at the code and found that in both CreateChunkedUploadRequest and CreateAppendChunkedUploadRequest, several oauth parameters were being added to the request, but that they weren't being populated. It didn't look like these oauth parameters were present in other similar calls so I didn't think they were necessary. I ended up removing them and the chunked upload then worked.

On create, my request looked like this:

PUT /1/chunked_upload HTTP/1.1

And my response like this:

{"expires": "Wed, 18 May 2016 21:14:19 +0000", "upload_id": "AAAAAAAAAdGk8g0SdUJBLQ", "offset": 4194304}

I was then able to make an append request like this:

PUT /1/chunked_upload?upload_id=AAAAAAAAAdGk8g0SdUJBLQ&offset=4194304 HTTP/1.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.