psygo
psygo
Explore posts from servers
TTCTheo's Typesafe Cult
Created by psygo on 5/1/2024 in #questions
Converting String Encoded Images to Files to upload with UploadThing
This one seems to be working actually:
const url = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="
const f = new File(
[
Uint8Array.from(
atob(url.split(",")[1]!),
(m) => m.codePointAt(0),
),
],
"myfilename.png",
{ type: "image/png" },
)
const url = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="
const f = new File(
[
Uint8Array.from(
atob(url.split(",")[1]!),
(m) => m.codePointAt(0),
),
],
"myfilename.png",
{ type: "image/png" },
)
4 replies
TTCTheo's Typesafe Cult
Created by psygo on 5/1/2024 in #questions
Converting String Encoded Images to Files to upload with UploadThing
Hmm
4 replies
SSolidJS
Created by psygo on 8/17/2023 in #support
D3 Force Graph in SolidJS with TypeScript
I've added a bounty (150) to the SO question.
10 replies
SSolidJS
Created by psygo on 8/17/2023 in #support
D3 Force Graph in SolidJS with TypeScript
I've added it as a reference to the question (on SO)
10 replies
SSolidJS
Created by psygo on 8/17/2023 in #support
D3 Force Graph in SolidJS with TypeScript
Wow, mate, you went far above and beyond anything I would like to do. I'll give it a try, but your work seems way out of my wheel house.
10 replies
SSolidJS
Created by psygo on 8/17/2023 in #support
D3 Force Graph in SolidJS with TypeScript
What I would like to have is exactly this: https://discord.com/channels/722131463138705510/1141837112975568936/1141837112975568936, but in SolidJS, the link I mentioned in the OP.
10 replies
SSolidJS
Created by psygo on 8/17/2023 in #support
D3 Force Graph in SolidJS with TypeScript
Yes, I think the question is mostly about D3 and TypeScript, and that's the approach I've tried all day, but couldn't make work.
10 replies