PadCodedocs

Pick Photos

Opens the photo library so the person can choose photos.

Category: Device · Takes time: the next step waits for it

#When to use it

Use it to let people choose pictures they already have: a profile photo, photos for a post, a receipt.

#Example

A Change photo button: Pick Photos with Into: avatar. An Image linked to avatar shows it.

#Good to know

  • It needs no permission: the photo library opens outside your app.
  • Limit 1 saves one photo; more saves a list of them. 0 lets people pick as many as they like.
  • Photos are kept as JPEG pictures, at most 1600 pixels on their longest side, so they're small enough to remember or send to an API.
  • With Kind Videos or Any, a video is saved as the address of a temporary copy, which a Video Player can play.
  • If the person closes the library without choosing, the run stops quietly.

#Add it

Select a view, open the Inspector's Actions tab, pick when it runs, tap Add action and choose Pick Photos (under Device). Tap the step to open its settings.

#Settings

SettingWhat it doesKindDefault
IntoWhere to save the photos.VariableRequired
LimitHow many can be chosen. 1 saves one photo; more saves a list.Number1
KindWhat can be chosen.Choice: Images, Videos, Anyimages

#What it gives back

A photo (or a list of them) that an Image can show.

#See also