godotengine / godot-asset-library

PHP frontend for Godot Engine's asset library
https://godotengine.org/asset-library
MIT License
284 stars 85 forks source link

Can't submit icon url that ends in ?raw=true #314

Open blackears opened 7 months ago

blackears commented 7 months ago

I'm trying to submit to the asset library using the Custom method. I need to provide a URL to an icon. I want to provide a link to one uploaded to my Github page, but it's being rejected because it ends in ?raw=true instead of .png. Could the code allow for an exception for this from github repositories?

Same for anything I might upload to google drive. They don't end in .png either.

Error: Due to spam problems, we have to reject your asset because:
"https://github.com/blackears/terrain_layered_shader/blob/master/godot/icon.png?raw=true" doesn't look correct; it should be similar to "http<s>://<url>.<png/jpg>". Make sure the icon URL is correct.
Please contact the community administrators if this is not spam.
YuriSizov commented 6 months ago

GitHub repositories provide compatible links. In fact, the one that you've submitted is redirected to one: https://raw.githubusercontent.com/blackears/terrain_layered_shader/master/godot/icon.png

(although it's preferable if you use one from a specific commit hash rather than from the master to avoid changing it unexpectedly for users).

Calinou commented 6 months ago

We could perform the redirect on our end automatically (using a regex), so you don't have to do it yourself when submitting the asset.

blackears commented 6 months ago

I know you're doing a redesign - it might be better in the new design for you to just host everything so you're not reliant on external sites.

But also, perhaps have your regex just ignore everything after the ? could work too.