A FiveM script that allows you to upload media files directly to the server. It also allows you to access the files.
- Download the script and rename it from
lb-upload-mastertolb-upload - Place it in your resources folder
- Add
ensure lb-uploadto your server.cfg - Configure the script (see below)
It is strongly recommended to change the default api key. You can do that in the config.lua file.
Use with lb-phone
This script was primarily developed to be used with lb-phone. Follow these steps to set it up with lb-phone:
- Change all
Config.UploadMethodtoLBUploadin the lb-phone config.lua file. - Set your api key in
lb-phone/server/apiKeys.luato the same key you set in the lb-upload config file.
This requires lb-phone v1.5.3 or later
Make sure you have node.js and pnpm installed
- Clone the repository
- cd into lb-upload-v2/server/backend
- Run
pnpm install - Open
node_modules/@koa/multer/index.jsand change
let originalMulter = require("fix-esm").require("multer")to
let originalMulter = require("multer")- Run
pnpm watchto start the server. Make sure to restart the script in FiveM after making changes.