Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: please provide example of image upload (PATCH) #662

Open
sarn0ld opened this issue Jan 16, 2019 · 0 comments
Open

Docs: please provide example of image upload (PATCH) #662

sarn0ld opened this issue Jan 16, 2019 · 0 comments

Comments

@sarn0ld
Copy link

sarn0ld commented Jan 16, 2019

After debugging and trying around for several hours I now found out how to upload images (e.g. for a news_item).
Other than stated in the documentation the json property should be called "image", not "file".
Maybe somebody needs this later, so I note it down here for future reference... here is a working Example:

{ 
  "title": "TestTitle1",
  "description": "TestDesc",
  "text": {
    "content-type": "text/html",
    "data": "TestText",
    "encoding": "utf-8",
  "image": {
      "data": "/9j/4A***BASE64-Encoded-Utf8-String***A//Z\n",
      "encoding": "base64",
      "filename": "image.jpg",
      "content-type": "image/jpeg"
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant