"inArray requires at least 1 value" error deleting files with uploadthing

Hey, getting an error that I'm unable to resolve, it says there's no values specified but there's clearly one in the input Mutation code attached thanks for any help!
No description
No description
Solution:
You can't delete file using the URLs, you need the file key: utapi.deleteFiles("https://utfs.io/f/file-key-uuid.png");utapi.deleteFiles("file-key-uuid.png"); ✅...
Jump to solution
6 Replies
hyhy
hyhy8mo ago
and the mutating code for good measure
No description
hyhy
hyhy7mo ago
oh I just renamed deleteFile mutation to deleteFiles in between screenshots so that's not the error bump never solved this one, any help appreciated
markr
markr7mo ago
Log the input you are getting in the mutation to confirm you are in fact getting the value and it is not getting lost for some reason?
Solution
ibby
ibby6mo ago
You can't delete file using the URLs, you need the file key: utapi.deleteFiles("https://utfs.io/f/file-key-uuid.png");utapi.deleteFiles("file-key-uuid.png");
hyhy
hyhy6mo ago
oh i totally gave up on this but if it works i will thank you forever sorry i missed your message too markr i'll give it a try tomorrow
hyhy
hyhy6mo ago
ok i took a long break but yes this works thank you so much
Want results from more Discord servers?
Add your server
More Posts