psygo
Explore posts from serversTTCTheo's Typesafe Cult
•Created by psygo on 5/1/2024 in #questions
Converting String Encoded Images to Files to upload with UploadThing
In my app, I'm using a libary which handles files in a file manager as base 64 strings. Is there a practical way of uploading string encoded images with UT?
If not, here's what I've been trying (the rest of the code is basically the docs' default setup):
When I try this, I get this error:
I've also tried the many other ways of converting image strings to binaries, e.g. these.
4 replies
D3 Force Graph in SolidJS with TypeScript
I've originally asked this on StackOverflow.D3 seems so complicated to make work with basically any framework... Specially when it comes to TypeScript, since they apparently keep changing their APIs, rendering so many past examples from gists and other posts close to useless. At the moment, I would like to make work with TypeScript and SolidJS the canonical force graph example. I feel like trying to solve a jigsaw puzzle since a lot of the types just won't match. The one I've had the most trouble with was the
drag()
arguments, I believe. I've also tried simply ignoring types, of course, but I couldn't make it work either.
Also, does anyone know if it is possible to append any arbitrary component as a graph node?
---
References
1. D3 - Force Directed Graph
1. Easily show relationships — Draw Simple Force Graph with React & d3 utilizing TypeScript
1. Building D3 interactive network graph D3 Force-Simulation + React + TypeScript
1. mbostock's Gist
1. steveharoz's Gist with Full Controls10 replies