write_attach_media
Upload a local photo or video from your computer and attach it to a logged workout or custom exercise for media records.
Instructions
Upload a photo or video from this computer and attach it to a logged workout (up to 6) or to a custom exercise (one; replaces the old one). path is an absolute local path (~/ allowed). Only JPEG, PNG, WebP, GIF, MP4, MOV and WebM files are read. Photos lose their metadata first (location, camera, time, and anything appended after the image such as a motion-photo video; the orientation stays). A video is refused when it carries location data leap recognises (QuickTime and 3GPP location, Apple location keys, EXIF/XMP GPS tags, GoPro or Google GPS tracks); other vendor formats are not detected. Files are not resized: check the limits with read_media_usage. The app shows a small preview in lists, which it makes itself; leap cannot, so a file attached here shows a placeholder in lists until it is opened.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| workoutId | No | ||
| customExerciseId | No |