Introduction

Getting started

Walkthrough Guides

CafeX Apps

Workflows

Using CafeX Collaborate App

Reporting

Managing CafeX

Integrating CafeX

Security

App Studio

App Studio Components

App Studio Components

Managing File Uploaded Component

Modified on Wed, 15 Jan at 4:20 AM

TABLE OF CONTENTS


The File uploaded Component allows users to upload files directly within the App.


Appearance Settings


The File uploaded Component includes standard appearance settings, such as size and position, visibility, background, text, padding, margin, border, drop shadow (for details on standard appearance settings, check the Altering the appearance of an App Studio Component article).


Configuration Settings


The following settings are available for the File uploaded Component:

SettingDescription
Custom Image as an IconProvide an image URL or choose an image to use as an icon.
Primary textAdd the main text displayed to users.
Secondary textProvide the additional text, such as guidelines or restrictions for uploads.
Button textDefine the label for the upload button.
Allowed file typesSpecify the types of files users can upload.
Max file sizeSpecify the maximum file size that can be uploaded and select a unit (KB or MB).
Output as data URLToggle this setting to determine how the uploaded file’s content is returned in the output array.
Disabled: Returns Base64-encoded data in the contentfield.
Enabled: Returns a Data URI in the content field (e.g., data:image/png;base64,).
Tooltip textProvide a tooltip to give users additional information when they hover over the Component.
Event handlersAdd new even handlers or manage the existing ones. For details on event handlers, check Using Event Handlers.


Example: Profile Picture Uploader


To illustrate the setup of a File uploaded Component, let’s create a Profile Picture Uploader.

To configure the Profile Picture Uploader:

  1. Add the File uploaded Component onto the canvas.
  2. Set the Configuration:
    Custom image as an iconUse an image URL of a camera icon.
    Primary textEnter Upload Your Profile Picture.
    Secondary textAdd Maximum size: 2 MB. Accepted formats: .jpg, .png.
    Button textSet to Choose File.
    Allowed file typesSpecify .jpg, .png.
    Max file sizeSet to 2 MB.
    Output as Data URLEnable this option if you need the image data encoded as a data URL.
    Tooltip textEnter Click to upload your profile picture.
    Event HandlersAdd an event handler that will navigate the user to the Profile Settings tab to complete their profile once the picture is selected. The event handler should have the following properties: Handler name: Navigate to Profile Settings, Event type: File selected, Action: Select a tab.
  3. Customize the Appearance:

    SettingDescription
    Size and PositionDefine size and position settings.
    BackgroundSet the background color to the desired color, for example, #FFFFFF.
    TextSet the color to the desired color, for example, #333333.
    PaddingAdd 10px of padding to ensure spacing inside the Component.
    BorderUse a 2px solid border with rounded corners (5px) and color #CCCCCC.
    Drop ShadowAdd a shadow with color #C4C4C4 and a blur radius of 5px.


The screenshot below shows the File Uploaded Component configured for a profile picture upload.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article