We've moved discussions to Discord

Can I use the "attachable_sgid" field returned from a User JSON GET request to display an image?

Brian Carpenter
I'm trying to access the User avatar object from active storage and display it in an electron application.  My get request (from electron) returns JSON which includes an attachable_sgid but I'm not sure what to do with it from there.

Using this URL:

http://localhost:3000/rails/active_storage/blobs/BAh7CEkiCGdpZAY6BkVUSSIqZ2lkOi8vanVtcHN0YXJ0LWFwcC9Vc2VyLzE_ZXhwaXJlc19pbgY7AFRJIgxwdXJwb3NlBjsAVEkiD2F0dGFjaGFibGUGOwBUSSIPZXhwaXJlc19hdAY7AFQw--2465471c08be19196738d37c7f02be10c4a88bba

Gives this error:

No route matches [GET] "/rails/active_storage/blobs/BAh7CEkiCGdpZAY6BkVUSSIqZ2lkOi8vanVtcHN0YXJ0LWFwcC9Vc2VyLzE_ZXhwaXJlc19pbgY7AFRJIgxwdXJwb3NlBjsAVEkiD2F0dGFjaGFibGUGOwBUSSIPZXhwaXJlc19hdAY7AFQw--2465471c08be19196738d37c7f02be10c4a88bba"

Any help will be appreciated.  Thanks.

Brian Carpenter
Was able to figure this out with some help from SO.


Notifications
You’re not receiving notifications from this thread.