[LUA] Creating a file through a http post request

How would i go on and create a file through a http post request in lua (Roblox)? Is there a glitch api for it? https://glitchapi.glitch.me/ I found this but i don’t see any create file post request.

What do you mean by create a file? Do you mean in your project?

Yeah, to make a http post request to glitch and create a file inside of my project.

Right now, as there is not official docs of the Glitch API, I don’t think that is possible. Sorry!

Your other option would be to code your own API inside of your project. You could always use a file managing package to handle POST requests and this upload a file:

1 Like

Yes, basically you can create a Node.js Express project that accepts requests and reads the POST request body and uses it to create files and fill it with content (using the native fs module).

2 Likes

I was once a nerd with this so I should probably be able to help you.

Create a Node.js express project and add these packages:

  • bodyparser

and that’s it. Then, require these and put them in a variable like near the beginning of your code.

Also, you should require the fs module, it’s built in, for file creation.

Now write your POST request with Express and then do some magic with Roblox’s luau and do some :PostAsync magic I think

1 Like