52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
---
|
|
title: Upload a File
|
|
sidebarTitle: Upload a File
|
|
---
|
|
|
|
Follow the steps below to upload a file to MindsDB.
|
|
|
|
<Note>
|
|
Note that the trailing whitespaces on column names are erased upon uploading a file to MindsDB.
|
|
</Note>
|
|
|
|
|
|
1. Access the MindsDB Editor.
|
|
2. Open the `Add` menu and choose `Upload file`.
|
|
|
|
<p align="center">
|
|
<img src="/assets/sql/upload_file1.png" />
|
|
</p>
|
|
|
|
3. Select a file, provide its name, and click on `Save & Continue`.
|
|
|
|
<p align="center">
|
|
<img src="/assets/sql/upload_file2.png" />
|
|
</p>
|
|
|
|
4. Now you can query the file.
|
|
|
|
```sql
|
|
SELECT * FROM files.file_name;
|
|
```
|
|
|
|
Here is how to list all files:
|
|
|
|
```sql
|
|
SHOW TABLES FROM files;
|
|
```
|
|
|
|
This command is the same as the command for listing tables because files uploaded to MindsDB become tables within the MindsDB ecosystem and are stored in the `files` database.
|
|
|
|
### Configuring URL File Upload for Specific Domains
|
|
|
|
The File Uploader can be configured to interact only with specific domains by using the [`url_file_upload` key in `config.json` file](/setup/custom-config#url-file-upload).
|
|
This feature allows you to restrict the handler to upoad and process files only from the domains you specify, enhancing security and control over web interactions.
|
|
|
|
To configure this, simply list the allowed domains under the [`url_file_upload` key in `config.json` file](/setup/custom-config#url-file-upload).
|
|
|
|
## What's Next?
|
|
|
|
Now, you are ready to create a predictor from a file. Make sure to check out
|
|
[this guide](/sql/create/model/)
|
|
on how to do that.
|