this post was submitted on 04 Feb 2025
4 points (83.3% liked)

Lemmy Apps

5648 readers
31 users here now

A home for discussion of Lemmy apps and tools for all platforms.

RULES:


An extensive list of Lemmy apps is available here:

LemmyApps.com

or lemmyapps.netlify.app


Visit our partner Communities!

Lemmy Plugins and Userscripts is a great place to enhance the Lemmy browsing experience. [email protected]

Lemmy Integrations is a community about all integrations with the lemmy API. Bots, Scripts, New Apps, etc. [email protected]

Lemmy Bots and Tools is a place to discuss and show off bots, tools, front ends, etc. you’re making that relate to lemmy. [email protected]

Lemmy App Development is a place for Lemmy builders to chat about building apps, clients, tools and bots for the Lemmy platform. [email protected]

founded 2 years ago
MODERATORS
 

yup. me again...
client
proxy server (for cors)

i cant install lemmy-js-client because i have js. not node.js. i already tried some CDN and ESM libraries but it needs exports from node.js. i also tried to create some sort of lemmy-js-proxy (server with lemmy-js-client) which i would fetch through my site with the js but... JS CANT FETCH IT BECAUSE 404! i dont know why...

top 2 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 3 hours ago (1 children)

It might not help because it's in svelte and it doesn't look like you're using lemmy-js-client, but this is an example of how I do it in Alexandrite using lemmy-js-client. The onPaste function handles the paste event on the markdown editor textarea when someone pastes with an image in their clipboard, and the onFileInputChange is the change event for an <input type="file" /> element so when someone selects a file it uploads and the input's label can be styled like a button. Here is the client's fetch function which handles the authorization header and whatnot. You can upload client-side without a proxy server for any instance running a newer version of Lemmy than like.... 0.19.0? I didn't want to be responsible for proxying image uploads so I waited to add image uploading in Alexandrite until I could do the uploads directly client side.

[–] [email protected] 1 points 12 minutes ago* (last edited 11 minutes ago)

i cant install lemmy-js-client because i have js. not node.js. i already tried some CDN and ESM libraries but it needs exports from node.js. i also tried to create some sort of lemmy-js-proxy (server with lemmy-js-client) which i would fetch through my site with the js but... JS CANT FETCH IT BECAUSE 404! i dont know why...