On Tuesday, September 8, 2020 at 7:44:33 PM UTC+2, Qali Fah wrote:
>
> The problems i'm having are how i would represent the artwork(picture 
> file) and song (music file) in gorm (Golang ORM library) and in what format 
> do i return it to the client after being stored and are there external 
> packages i can use to simplify things?
>
I'd use filenames locally and return URLs to media. Reference the music and 
image files rather than stuffing them into the database. Store names, 
filenames and all the metadata you think makes sense (artist, album, genre 
and all sorts of extra tags) in the music file table.

If presenting a web API, JSON is perfectly fine (and most common). Any web 
frontends are likely to be JS anyway, so use a natively easy to use format. 
The built-in packages in the Go distribution can get you all the way, but 
if you like a little extra help with routing, Chi is a decent option:
https://github.com/go-chi/chi


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/eb1a0231-c95f-4443-8f33-a273039bff50o%40googlegroups.com.

Reply via email to