hashlips-lab / safe-nft-metadata-provider

A safe metadata provider for your NFT collection.
MIT License
74 stars 77 forks source link

No public/private url for the files #62

Open toastdoteth opened 3 months ago

toastdoteth commented 3 months ago

Digital Ocean only provide a single URL to the file in which its access is changed via a setting on DO. I think this breaks things?

liarco commented 3 months ago

Hi @toastdoteth, I need a bit more context to understand what you mean. The files are served through your S3 bucket directly. What URL are you talking about exactly?

I would suggest you to watch my video tutorials which show you the full process. If you have quest any questions you can also join the Open Devs Crew as we provide public support for bugs only.

toastdoteth commented 3 months ago

In the video you ask us to grab the public URI to the image file but there is no such thing anymore. The public/private access is a setting on DO than separate URIs On 1 Aug 2024 at 19:02 +1200, Marco Lipparini @.***>, wrote:

Hi @toastdoteth, I need a bit more context to understand what you mean. The files are served through your S3 bucket directly. What URL are you talking about exactly? I would suggest you to watch my video tutorials which show you the full process. If you have quest any questions you can also join the Open Devs Crew as we provide public support for bugs only. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

liarco commented 3 months ago

I'm not sure I get what you refer to (if this is not what you mean, then please share the time of the video so I can check the exact step where I tell you that). Anyways, the public URI was served by the DO's UI for convenience, but you can construct it on your own by using the bucket name, the region and the path that you used for the public files (e.g. https://YOUR_BUCKET.YOUR_REGION.digitaloceanspaces.com/PATH/TO/THE/PUBLIC/FOLDER, check the video for the exact format as you may need to have a full path with a wildcard, like .../{TOKEN_ID}.json).

I have to say that I can still see the option to grab the public URL from DO: https://github.com/user-attachments/assets/f92eaa73-f82c-4a2e-8ce4-c05c2d779a68

Please note that by "the public URL" I don't mean that it's actually "publicly accessible" all the time, what I mean is that my tool is gonna make the files available in that place, when needed.

Let me know if this helps.

toastdoteth commented 1 month ago

Thanks for coming back to me. I've messaged you on Twitter but to summarise here.. I hadnt followed correctly your tutorial but since corrected utilising private/public folders and setting the env correctly but the build is failing as its not importing typescript or something. I'm not sure if it will work anyway considering its been a couple of years but if you wouldnt miund checking your DMs on Twitter where Ive sent you some screens. Cheers

liarco commented 1 month ago

Thank you @toastdoteth.

As mentioned on Twitter, the project still works as intended, but it seems like DigitalOcean has changed a few things that make the build fail.

For context: now the dev dependencies are removed from the project before running the custom build command, this makes the build fail as tsc cannot be found. Luckily, there's a quick fix because they recognize my standard build command and they run it for you, so you can simply remove the "custom build command" and everything should work as expected until I have time to fix this on the repo.

Here are some instructions...

Fix an existing deployment

  1. go to the app settings
  2. click on the resource name (you should have just one)
  3. scroll down to the "Commands" section and click "Edit"
  4. remove the custom build command and save (you should see the same result as in the screenshot below)
Screenshot 2024-09-20 at 10 10 20

New deployment

  1. once you start configuring your app on DigitalOcean, click on the "Edit" button next to the only available resource
  2. then edit the build command and leave it blank (you should see the same result as in the screenshots below)
Screenshot 2024-09-20 at 10 16 20 Screenshot 2024-09-20 at 10 17 08
toastdoteth commented 1 month ago

Amazing. It works! Thank you so much.