If I change it to multipart/form-data, data is empty but will still submit blank rows in database
I can’t figure it out what’s wrong with it?
Do I have to do it in Custom JS??
Appreciate any help
Thanks in Advance
I can’t figure it out what’s wrong with it?
Do I have to do it in Custom JS??
Appreciate any help
Thanks in Advance
Seems like there’s an issue with what you are sending. Can you show your xano endpoint inputs via a screenshot?
I mean, xano side
Hi @Jatin
The file upload workflow action will return a string with the URL of the file. You can send this to a “text” field in Xano.
In your screenshot, it seems you are trying to send that URL to a “file resource” field in Xano.
To do this, yes, for now you’ll need some JS. We’ll add native actions soon but, in the meantime, check out this video.
Here’s the code snippet they reference in there:
const fileObject = variables[/* File 1 - value */ 'b6336bd9-ada3-4f31-b704-48051cdafb48-value']
function fileToBase64(file, callback) {
const reader = new FileReader();
reader.onload = function () {
const base64String = reader.result.split(',')[1]; // Extract the base64 data from the result
callback(base64String);
};
reader.readAsDataURL(file);
}
return new Promise((resolve) => {
fileToBase64(fileObject, function (base64String) {
console.log(`data:${fileObject?.['type']};base64,${base64String}`)
resolve(`data:${fileObject?.['type']};base64,${base64String}`);
});
})
Hi, i already solved the problem but thanks