Using N8N native module, how to insert a row type file

I got a url of a file audio. .OGG how do I send this to a new row ?

image

image

@joffcom we need your help here :pray:

I think I found a easy way.

As I say I am using N8N,

image

First I use the HTTP Request to send the file by providing the URL

curl
-X POST
-H “Authorization: Token YOUR_DATABASE_TOKEN”
-H “Content-Type: application/json”
https://your-baserow-url/api/user-files/upload-via-url/
–data ‘{
“url”: “insert here the url of the file”
}’

Then I will get a response of all file information that was uploaded like this:

[
{
“size”: 1046,
“mime_type”: “audio/ogg”,
“is_image”: false,
“image_width”: null,
“image_height”: null,
“uploaded_at”: “2024-02-16T13:20:26.769819Z”,
“url”: “https://baserow.com.br/media/user_files/lfZCl5TCrHnylx8j4bxzZPDNGl9lOBUE_a685df17610cada7a57d213062942d86b34cd382faf1643977d5fd05589188ae.ogg”,
“thumbnails”: null,
“name”: “lfZCl5TCrHnylx8j4bxzZPDNGl9lOBUE_a685df17610cada7a57d213062942d86b34cd382faf1643977d5fd05589188ae.ogg”,
“original_name”: “3EB0AC89A3AD1DA3EB338A.ogg”
}
]

Then using another HTTP Request I create a new row by using the “name”

curl
-X POST
-H “Authorization: Token YOUR_DATABASE_TOKEN”
-H “Content-Type: application/json”
https://baserow.com.br/api/database/rows/table/446/?user_field_names=true
–data ‘{
“File”: [
{
“name”: “lfZCl5TCrHnylx8j4bxzZPDNGl9lOBUE_a685df17610cada7a57d213062942d86b34cd382faf1643977d5fd05589188ae.ogg”
}
]
}’

But for now by using the native module of n8n I don´t know what put insite the field value.

image

Hey @michaelvips,

Looking at it we don’t support sending binary data to the field. We could really do with updating the node to use our newer components where we work out the possible data types.

For now I would recommend using the http request node like you are doing. Sorry I couldn’t be more help but I will create an internal feature request to update this in n8n.