Oddbean new post about | logout
 Ah, sorry for all the trouble. It is a bit of a PITA to use. You can take a look at how I implemented delete with nip96 here if it will help. https://github.com/nostrbuild/nostr.build/blob/main/build/src/delete.js

🐶🐾🫂🫂🫂 
 I plan to make a package specifically for nostr.build to get rid of the boilerplate and simplify it even more so people won’t even need to read the nips to figure out how to upload files 
 That would be splendid 🐶🐾🫂🎉 
 nostr.build responds with a 404 when i try to delete files. i've confirmed the file hash matches the file hash in the success response. here's an example URL that's returning a 404 when i send a delete request to it https://nostr.build/api/v2/nip96/upload/2f97733887b45a6a423b6eb9abd2587c5473c2bfaa8f894dba48939fadbd93d2 
 404 when you do it first time, or on a second attempt? Same media and npub? Not a duplicate upload? 🐶🐾🫡 
 I’ve tried it many times with my npub. Can’t get delete to work. 404 every time. I have a premium account. Not sure if that has anything to do with it. 
 Let me check, I may have bugs in that part of the code. Free should work well 🐶🐾🫡 
 I’ll try a different account when I get home 
 @The Fishcake🐶🐾 delete worked with npub on the free tier. So prob a big with premium accounts. 
 I see, I’ll check it out and try to fix asap 🐶🐾🫂 
 Ok, I know what the problem is, for paid accounts we cannot use hash, only custom name, since we allow duplicates of the media for many reasons (shared vs. archived) and to prevent account media access by knowing a hash. So you need to pass file name for it to work 🐶🐾🫡 
 Prob be good to update the error message to mention something about that 
 404 is correct, since file is not found. Cannot identify any other way, since it’s the matter of hash vs string and hash is the correct way for general things 🐶🐾🫡 
 Okay. I can just add documentation to the README about it. Prob add delete tomorrow. 🤙 
 You can mod the library to pass filename and that solves the problem. It will work for both 🐶🐾🫡