I'm testing ReTool if this is the tool for us and we can use it for internal processes. note I'm new to coding.
I have a App "Task" and I want to add attachment / documents to the task I'm working on. The files shall be stored on our server and not in any clouds.
Is there a way to use drag and drop component and a button to trigger upload file to eg. D://task/files/[fileID]/filename.pdf
Is there a way to setup a disk as resource?
Any Ides in how to store files on our local server?
You can upload files to a Retool app with several possible drag and drop components as shown in our docs here.
You can use a button to trigger a query (REST API or similar action)to interaction with a Resource(database) that you set up.
Currently we do not have any Resources for writing to your local Disk. You would have to send the data to a DB you host that is connected to a Retool App via a Resource and then process the data from there to your computer's disk.
@Thore Yes you can display a base64 encoded PDF with the in app component on Retool!
You can read more about the component here and here. You will need to change the PDF Source in the component's inspector tab.
The Storage option will allow you to chose the file from your disk and the JS option will take a File Object with key-values pairs as shown in the tool tip below.
From the error message it looks like you need to take the string you are trying to pass directly in, and first wrap it inside an object.
In the object the key will be 'base64Data' something like the error example {name: 'imageName, type: 'application/pdf, sizeBytes: number, base64Data: 'string'}. You can create this object in a transformer or Javascript Query and then send the result of that into the PDF display component.