End of Year Sale: 30% off your first year on annual plans. Use code AP5-30-OFF See plans

Let people upload photos (App Camera block)

Build Your App · Документация AppPresser

Let people upload photos (App Camera block)

Эта статья ещё не переведена, поэтому показана на английском.

Your app journey: step 4 of 9, Add pages and features. New here? Read Start here: build your app with AppPresser first.

What you'll do: Add TAKE PHOTO and PHOTO LIBRARY buttons so people can take a photo, or pick one from their phone, and upload it to your WordPress website.

Before you start

Add the block

  1. In the left menu, under Customization, click Custom Pages.
  2. Click the name of the page you want to change. To make a new page instead, click Add New Page, type a title, keep Page Builder selected and click Create Page.
  3. Below the last block on the page, click Add Block.
  4. In Search blocks…, type App Camera, then click the block. It is added to the bottom of the page.
  5. In Action, choose This, New or Library. This uploads the photo to the current post or page. New uploads it to a new post or page. Library saves it in the media library, not attached to any post or page.
  6. If you chose This, type the ID of the post or page in Post ID.
  7. Click Save Changes at the top of the editor.
  8. To see a new page in the App Preview, add it to a menu. See Add a page to your app menu.

The App Camera block in the editor with Action set to This and an empty Post ID box

If a required box is empty when you save, a red banner at the top says a required field is missing and the block is highlighted. Fill in the box and click Save Changes again.

A red banner at the top of the editor saying 1 required field missing, fix the highlighted block before saving

What you see in the app

The block shows the TAKE PHOTO and PHOTO LIBRARY buttons.

The TAKE PHOTO and PHOTO LIBRARY buttons in the App Preview, between other blocks on a test page

The camera works only in the app on a real phone, not in the App Preview.

Tips

Tips

  • To move a block, drag it by its handle (the dots on the left). Click the arrow to fold it closed.
  • To copy a block, click the Duplicate icon.
  • To turn a setting on or off, click the switch itself, not the words next to it.
  • After you save, open the page in the App Preview and check your changes.

Careful: The trash icon removes a block right away. Check before you click.

You're done when the block shows on your page in the App Preview.

Next step

Sell in-app purchases (In App Purchase Form block)

Это было полезно?

Не нашли ответ?

Наша служба поддержки поможет с настройкой, сборками и вопросами о магазинах приложений.