Xata Dashboard error when trying to delete a file
Hi 👋
I remember this working a few months ago, but now I'm getting an error whenever I try to update a record in the Dashboard that has a file.
The error message:
Is this a bug or am I doing something wrong?
13 Replies
Hi Michael, I've not been able to recreate this error when editing records with files. Are you updating the record directly via the UI or through the playground?
Hi cmck
Directly via the UI. I clicked the pencil icon in the record, clicked on the image, clicked the trash icon, confirmed the deletion and tried to save the record, which failed.
Hmm, let me take another look, thanks for bearing with me. Do you have a request ID you can share, by any chance?
Sure, it turns out, that I can't even save the record even if I don't make any changes.
c8ebc55b-c219-97b0-b4d9-ecc25b28a05e
Thanks Michael, I'll have a look now and see what the story is.
Same error when trying to create a fresh record:
4043c709-d726-94f1-a1a3-eb535eb899ff
Ok I was able to recreate the error. It's related to the Native SQL Table setting. If you disable this setting you'll be able to update the row with the file attachment. You can then re-enable this setting after making the edits.
Where can I find this setting?
Nvm, I found it. I'll check if it works now
Btw, this solved the issue. Could you briefly explain the downsides of keeping this disabled?
Glad to hear it's resolved. Keeping it disabled means you have to have xata columns in all your databases and there's less support for postgres native types. I'll see if I can dig up some examples for you, Michael.
That would be great, thanks!
We would like to eventually move away from having to have all the Xata fields, though it's not much of an issue. I know you are working on that. Are there any updates when we can drop those, or has something changed regarding this?
In any case, we would like to be able to edit those special fields in the dashboard. It's a great way to not have to have an up-and-running Xata SDK implementation that enables file field updates. So: Is will this issue be fixed, even for the native sql table editor setting?
Are there any updates when we can drop those, or has something changed regarding this?There's no update, we're still working on known issues around functions that require the Xata fields (such as bulk upsert, for example).
Will this issue be fixed, even for the native sql table editor setting?In order to use Files, you have to have the Native SQL Table setting disabled. The issue you observed happened because we enabled this setting by default when we released the "new" table. We have no plans to develop the Files functionality further. To share a little context, we had a lot of difficulty integrating Files with the Native SQL Table, which is why we introduced the toggle so you can flip between the "old" and "new" table. Sorry for the long-winded explanation, I hope that clarifies things 🙂
To share a little context, we had a lot of difficulty integrating Files with the Native SQL Table, which is why we introduced the toggle so you can flip between the "old" and "new" table.This makes sense. Although, currently, the Native SQL Table is unusable if you have a single file field in the table you want to edit. Editing is basically blocked until you switch the setting. May I make a suggestion to skip/block updating the file fields when having the setting enabled? So we can at least edit the other fields.
May I make a suggestion to skip/block updating the file fields when having the setting enabled? So we can at least edit the other fields.A fair point. This is something we're working on. 👍