NoCloud CFX SDK provides seamless integration with the NoCloud platform, enabling FiveM and RedM servers to capture and upload in-game screenshots directly to cloud storage.
- 📸 Native Screenshot Capture - Uses
@citizenfx/threeandCfxTexturefor direct game view capture - ☁️ Cloud Storage - Upload screenshots directly to NoCloud's serverless storage
- 🔒 Signed URLs - Secure uploads with pre-signed URLs
- ⚡ Zero Dependencies - Self-contained, no external resources required
- 🛠️ TypeScript First - Full type safety across client, server, and NUI
Download the latest release from GitHub Releases.
Unzip the downloaded file and place the nocloud folder into your server's resources directory.
resources/
└── nocloud/
Add the following line to your server.cfg to ensure the resource starts:
ensure nocloudAdd your NoCloud API key to your server.cfg:
set NOCLOUD_API_KEY "your_api_key"Note: You can get your API key from the NoCloud Dashboard.
-- Take a screenshot and upload to cloud storage
local result = exports.cloud:TakeImage({
reason = "mugshot"
})
if result then
print('Screenshot uploaded:', result.url)
print('Media ID:', result.id)
end
-- Generate a signed URL for client-side uploads
local signedUrl = exports.nocloud:GenerateSignedUrl('image/png', 1024, {
location = json.encode(GetPlayerCoords(PlayerPedId()))
})-- Generate a signed URL for uploading
local signedUrl = exports.nocloud:GenerateSignedUrl('image/png', 1024, {
player_id = 1
})
-- Upload a file directly (base64 or raw data)
local result = exports.nocloud:UploadMedia(base64Data, {
player_id = 1
})
-- Delete a file from storage
local success = exports.nocloud:DeleteMedia(mediaId)The Lua libraries provide type-annotated wrappers around the exports. Add them to your fxmanifest.lua:
-- For client-side usage
client_script '@nocloud/lib/client.lua'
-- For server-side usage
server_script '@nocloud/lib/server.lua'Client-side usage:
-- Cloud global is available after including the library
local result = Cloud.storage:take_image({ type = 'screenshot' })
if result then
print('Uploaded:', result.url)
endServer-side usage:
-- Cloud global is available after including the library
-- Generate signed URL
local signedUrl = Cloud.storage:generate_signed_url('image/png', 1024)
-- Upload file
local result = Cloud.storage:upload(base64Data, { category = 'files' })
-- Delete file
local success = Cloud.storage:delete_media(mediaId)MIT © NoCloud
