Each route needs its
media permission: media:read to list, get, read download links or upload links, or analyze a video, media:create to upload, import or make an upload link, and media:delete to delete. Older keys with the legacy posts ability cover media too. See Permissions.id. Put it in a post’s content[].media when you create or update a post, or in a comment’s media.
Using media on posts
Each item ofcontent[].media is either:
- An id of a file in the library (from a list, get, upload or import), in the post’s workspace.
- A link (
https://) to a picture, video or document. The file is copied into the library when the post is saved, so the post doesn’t depend on your link staying up: signed and expiring links are fine. Dropbox and Google Drive share links work when anyone with the link can view the file. A link that can’t be downloaded, isn’t an allowed type, is over 500 MB or takes longer than 75 seconds is refused with422naming it, and no post is saved.
media list.
Supported types
MKV, AVI and other types are refused when they are uploaded or linked. Types and limits has what each network takes.
Documents
A document becomes a LinkedIn document post (the swipeable carousel). Two rules apply when it is published:- LinkedIn takes one document a post. With several, only the first is published.
- The document must be the first item in
content[].media. PostSyncer picks the post’s kind from the first file, so a document after a picture or video is dropped: LinkedIn can’t mix them.
media takes no documents: only pictures and videos.
Picture copies
A JPEG, PNG or WebP picture gets smaller copies a few seconds after it is saved, to show it without loading the whole file:
Each is left out until it is made, so use
url when the one you want isn’t there. These get none:
- GIFs, documents and links.
- Pictures over 50 MB, JPEGs over 50 megapixels, and PNG and WebP pictures over 20 megapixels. On an animated picture every frame counts.
- The copies PostSyncer makes of a picture to fit one network’s rules.
- Copies of Google review photos.
- A file PostSyncer can’t read as a picture.
Folders
Make folders with Create a folder, then sendfolder_id on an upload or import to file media there. List media takes folder_id or root_only to show one folder, or the files in none.
Related
- Upload a file: a file on disk.
- Import media from links: a file already on the web.
- Create a post: where the
idgoes.