I've written a library called "loon" (stands for "local files online") that you can find here: ungive/loon
This library allows any desktop application to generate temporary, internet-accessible links for a file that is only available on the local device. Requesting that link forwards the request to the desktop application and triggers an upload. One key feature is that link generation is instant which is perfect for this use case as you don't have to wait until the image is uploaded before you can set your Discord status. Images are also never permanently stored on the server.
I've successfully integrated and battle-tested loon in my own app called Music Presence in order to guarantee 100% cover image availability. So far it's done a fantastic job of it without any major problems.
Things that need work and that I would love to work on in order to make integrating loon easier:
- There is only a C++ client library at the moment. Ideally I would like to create bindings/an FFI interface for other languages instead of rewriting the client library in multiple languages. This would need to be done for an integration to be possible.
- There is no way to trigger uploads immediately upon link generation yet. The reason for that is that with Music Presence I crop images to 100x100 pixels, which makes uploads so fast that it's unnecessary to upload early. If you decide to not crop images something like this would need to be implemented, but I do think cropping is the way to go.
I've also talked about this in #231 before.
Would love to hear your thoughts!
I've written a library called "loon" (stands for "local files online") that you can find here: ungive/loon
This library allows any desktop application to generate temporary, internet-accessible links for a file that is only available on the local device. Requesting that link forwards the request to the desktop application and triggers an upload. One key feature is that link generation is instant which is perfect for this use case as you don't have to wait until the image is uploaded before you can set your Discord status. Images are also never permanently stored on the server.
I've successfully integrated and battle-tested loon in my own app called Music Presence in order to guarantee 100% cover image availability. So far it's done a fantastic job of it without any major problems.
Things that need work and that I would love to work on in order to make integrating loon easier:
I've also talked about this in #231 before.
Would love to hear your thoughts!