File upload over API
Hey,
I found you through Prisma while searching for a solution for isolated VS Code server instances. However, I need some additional features. Specifically, I need an API that allows me to upload and download files from individual instances.
Is that possible with Coder?
15 Replies
<#1371462706430742628>
Category
Help needed
Product
code-server
Platform
Linux
Logs
Please post any relevant logs/error messages.
this isn't something our API supports OOTB, you'll have to hack something together, either with SFTP via Coder's ssh proxy or you could expose an API that lets you upload/download files as an HTTP app via a
coder_app
or port-forwarding
you can probably work something out with our File Browser module but I'm not sure whether it's got an API so your best bet is probably to expose some custom http app that handles uploading/downloading
by the way, are you talking about Prisma, as in the ORM? or something else?yes from Prisma ORM
🙂
Okay, then I’ll need to build my own for that. 😦
There are so many VS Code server solutions, but none of them have support for VS Code extensions and has a file API.
yeah the file API abstraction is a bit too high level for the agent
though, if you need to grab the same file, you could also just define its contents as a
coder_metadata
block, that will then be accessible through the APIi need to load file from DB in to the Code Editor, then he can edit it and when he is finish i can get the file and safe it to the database
I tried to build my own using the Monaco Editor and the Prisma Language Server, but I wasn’t successful.
is it an SQLite DB?
also, do you need it to be accessible via an API or do you just want to be able to access it locally?
no Postgres
we're building Coder Desktop (currently in Early Access), which allows you to mount a workspace's files locally, so that could help
Coder Desktop | Coder Docs
Use Coder Desktop to access your workspace like it's a local machine
ah then if it's postgres then do you need the files?
you could either
coder port-forward
the PostgreSQL instance's port to your local machine, or have them send a SQL dump via an API or somethingMay I send you a DM? I don’t want to talk about my project publicly.
as in, having them push/pull from within the workspace itself instead of pulling/pushing from the outside of the workspace
sure!
ty, done 🙂
(moved over to DMs)
@Phorcys closed the thread.