---
updatedAt: 2025-07-15T08:33:06.000Z
agentTools:
  projectIndex: https://docs.appery.io/llms.txt
---

# File Picker: How To

How to set up the **File Picker** component for your mobile app

In this document, you will learn how to set up the **[File Picker](https://docs.appery.io/docs/file-picker)** component for your mobile app.

1. Drag the **[File Picker](https://docs.appery.io/docs/file-picker)** component to the needed app page (here, **Screen1**):

<Image align="center" className="border" border={true} src="https://files.readme.io/549b6f4-Animation.gif" />

2. Drag the **[Button](https://docs.appery.io/docs/button)** component and place it below the **[File Picker](https://docs.appery.io/docs/file-picker)**:

<Image align="center" className="border" border={true} src="https://files.readme.io/89cff17-Animation1.gif" />

Now, let's import the database service to add the file upload capability.

3. For this, click **CREATE NEW > Database Service** and select the ***FilesDB*** database from the drop-down. Expand the list of the ***tasks*** collection services and select the ***Upload*** service. Click **Import selected services**:

<Image align="center" className="border" border={true} src="https://files.readme.io/10414cb-Animation2.gif" />

4. In the left navigation menu open the settings of the service you just created. Open its **Request** tab and replace the ***X-Appery-Session-Token*** property with ***X-Appery-Master-Key*** in the **Headers** section.\
   Then, switch to the page with your database settings and copy its master key. After that, go back to the **Builder** and paste the master key value you just copied:

<Image align="center" className="border" border={true} src="https://files.readme.io/b3f0066-Animation3.gif" />

5. Open the **Screen1** **[DATA](https://docs.appery.io/docs/apperyio-visual-builder#data-panel)** panel and add the ***upload*** service to the page. Then, click the **Mapping** button of the **Before send** event to open the **[Mapping editor](https://docs.appery.io/docs/5-event-handling#working-with-mapping-editor)**:

<Image align="center" className="border" border={true} src="https://files.readme.io/3760cf9-Animation5.gif" />

6. In the **Mapping editor**, map the page ***FilePicker > Value*** to the ***Service request body > data*** as shown below by using drag-and-drop. Save the mapping:

<Image align="center" className="border" border={true} src="https://files.readme.io/8ad09a3-Animation6.gif" />

7. Go back to the page **[DESIGN](https://docs.appery.io/docs/apperyio-visual-builder#design-panel)** panel and replace the default button text with, for example, ***Upload***. This can be done right in the mobile frame:

<Image align="center" className="border" border={true} src="https://files.readme.io/b3b09e3-Animation7.gif" />

8. Now, unfold the page **[EVENTS](https://docs.appery.io/docs/apperyio-visual-builder#events-tab)** tab.\
   By default, the button is selected with its **Click** event enabled. Select the **Invoke service** action with the added ***upload*** service as a datasource and save the event:

<Image align="center" className="border" border={true} src="https://files.readme.io/9933f2f-Animation8.gif" />

9. Save the project and click **TEST** to open the **[App preview page](https://docs.appery.io/docs/9-testing-your-app#app-preview-page)**.\
   There, you can test the app by selecting the file on your drive and clicking the **Upload** button.\
   Then, open the **[Databases](https://appery.io/database)** page to check if the uploaded file appears in the database default **[Files](https://docs.appery.io/docs/database-collections#files)** collection:

<Image align="center" className="border" border={true} src="https://files.readme.io/6b87dd7-Animation10.gif" />