Fixed multipart upload. Added urlencode/decode for resources.