How to create a Retool reusable Module to upload files

January 1, 2000

Retool allows to package a unit of functionality into a Module, a neat capability to group in a single reusable component both UI elements and business logic as well, such as queries and js functions.

A perfect example to exploit it is a component to upload files.

Usually, such component require a bunch of typical ui elements, such as a button, a preview, a delete capability and the actual locig to performe the upload.

This can be used multiple times in a Retool application and duplicating such elements is not ideal.

Here we learn how to create out custom Module for such functionality.

00

Prepare the UI

add the required elements, supposing we want to make an image uploader, we need:

01

Add the business logic

Next, add the required logic to do the actual upload or other operations.

Add the upload query and the delete query. we use the internal Retool Storage resource for simplicity. Same paradigm can be applied also with other services.

02

test the component using multiple instances

What we have

Have a business need or a project in mind?

We help ambitious companies ride the change