Fun fact:

nostr.build uses sha256 to hash your image, and renames it that hash to prevent duplicate image uploads.

So although long, your image name is used the same hashing algorithm Bitcoin uses.

(a few of us are trying to come up with a better naming scheme, but this is it for now)

Ex.

nostr.build_bbb6694317ccaf24b3a7760097c8194f74fbcd2c932174d26373aae8c4c2a08f.jpeg

Reply to this note

Please Login to reply.

Discussion

Should we bech32 encode the hashes like we do npubs and note ids? "file1234abcd..."

have you changed anything on nostr.build html page...the regex is not working today, but it is fine yesterday...

I believe you add another link on the HTML so the regex just got broken, anyway I fixed it you can check out the diff of my commit https://github.com/digi-monkey/flycat-web/commit/74fa7dc5ac13fb88c554d2411e638a206fc7bdc7

πŸ‘Š Im working on a simple api already.. Thank you for the support

I just added a dedicated upload file to integrate to nostr.build with a JSON response of the html link.

Just point the uploaded file to:

nostr.build/api

And you will get a JSON response with the link only. Let me know if you have any issues..

cool, I will integrate if I have time today. one small suggestion, can you change the path to nostr.build/api/upload since we might have other api method later?

Yep, updated. Please use

https://nostr.build/api/upload

Thank you, I had to write a ShareX regex for this. Now it can be used with any uploader!

Is the API public or CORS protected?

I have opened CORS and basically just return a JSON of the link. Working on some bugs today..

updated in flycat, looks great, all good!

🎸🀘πŸ”₯