Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pleroma pleroma
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 646
    • Issues 646
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 86
    • Merge requests 86
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PleromaPleroma
  • pleromapleroma
  • Merge requests
  • !496

[#210] TwitterAPI: alt text support for uploaded images. Mastodon API uploads security fix.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ivan Tashkinov requested to merge i1t/pleroma:210_twitter_api_uploads_alt_text into develop Dec 04, 2018
  • Overview 38
  • Commits 10
  • Pipelines 10
  • Changes 11

Addresses #210 (closed)

Also addresses !496 (comment 8804) by introducing info[actor] field to uploaded objects, so we can restrict users to setting metadata for owned uploaded objects only (in both Twitter and Mastodon APIs).

Note: per https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-upload.html, POST media/upload endpoint does not seem to support passing metadata along with the image data, and https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-metadata-create suggests the following request flow:

* Upload media using either the simple upload endpoint or the (preferred) chunked upload endpoint.
* Call this endpoint to attach additional metadata such as image alt text.
* Create Tweet with media_id(s) attached.

This is different from current MastodonApiController#upload implementation which supports uploading image data with description. Per the above flow, this PR implements api/media/metadata/create endpoint which should be used to set uploaded image description.

Edited Dec 06, 2018 by Ivan Tashkinov
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 210_twitter_api_uploads_alt_text