algokittens / arc69

36 stars 4 forks source link

Optional full MIME type in hashtag, #mime/#other, standard field for preview image, #11

Open runvnc opened 2 years ago

runvnc commented 2 years ago

It's astonishing to me that there is no facility for expanding the hashtags beyond just the few ones there. Many systems may want to specialize in something else and use the hashtags and they will not be able to and so will need to increase the number of requests for rendering their galleries.

Need a #mime to mean 'other'. Should allow full mime type of it will fit. Should also decide now what field name people can use to specify a preview image if they support a less popular media type like PDFs or 3d models or anything that could benefit from a preview image. Rather than deciding that later or having people come up with random names. It would be an optional field.

Have raised these issues in Discord already. Just recording them here in case I am not actually crazy and some other people feel the same way down the line.

TommyAlex79 commented 2 years ago

Hi,

the most common types are defined as URL fragments.

Here is the spec at time of writing: SHOULD specify media type with # fragment identifier at end of URL. This format MUST follow: #i for images, #v for videos, #a for audio, or #h for HTML/interactive digital media.

Of course there can be other types also, and this is covered here: In addition to including a MIME type in the url field of the asset, the JSON Metadata schema allows indication of the MIME type and subtype.

Example: "mime_type":"video/mp4"

So, if your site can cover all sorts of special mime types, please have a look at the value in the body of the ARC69 JSON. The url fragments are meant to optimise the most common cases, so that the data is available in the asset definition, without having to fetch latest asset configuration also.

As for the "preview", for very large files, or files that cannot be "viewed" easily, the URL should point to the preview, while the full-res or non-easily-viewable file format should be in the JSON body in the "media_url".

runvnc commented 2 years ago

I am aware of that. Suggestions and reasons given still stand.

TommyAlex79 commented 2 years ago

It would be nice to have services that return all the info you require: URL, mime_type and media_url . These should work with various criteria: by asset-id, by creator-account, by owning-wallet-account, etc...

Something like the following (this is by creator-account, and only reports if asset is arc69, it skips non-arc69 assets):

Note: arc69.vercel.app is temporary, I don't plan to turn it off any time soon, but you should not be relying on it.

I suspect if arc69 is adopted and grows in popularity all of these services will come.

However, it might be worth possibly considering adding some other URL fragments for other types that might less popular but still fairly popular. Specific suggestions might be required.

ChrisAntaki commented 2 years ago

Hey @runvnc ! @TommyAlex79 and I chatted more, and we agree that supporting the full MIME type in the URL fragment could work well