-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
bugtriageNeeds a preliminary assessment to determine the urgency and required actionNeeds a preliminary assessment to determine the urgency and required action
Description
What happened?
It is no longer possible to use screenshot-basic with requestClientScreenshot, for example, because I cannot access the image that is sent in POST.
Expected result
Error: Access to this API has been restricted. Use -- allow-fs-write to manage permissions. Filesystem permission check from 'screenshot-basic' for permission fs.read on resource 'C:\Users\mathe\AppData\Local\Temp\upload_a955ca4254a78093bdb4409bB4c134c' - no device found
Reproduction steps
Use :
exports['screenshot-basic'].requestClientScreenshot(
source,
{
fileName: path.join(savePath, filename + '.png'),
encoding: 'png',
quality: 1.0,
},
async (err, fileName) => {
let image = await imagejs.Image.load(fileName);
const coppedImage = image.crop({ x: image.width / 4.5, width: image.height });
image.data = coppedImage.data;
image.width = coppedImage.width;
image.height = coppedImage.height;
for (let x = 0; x < image.width; x++) {
for (let y = 0; y < image.height; y++) {
const pixelArr = image.getPixelXY(x, y);
const r = pixelArr[0];
const g = pixelArr[1];
const b = pixelArr[2];
if (g > r + b) {
image.setPixelXY(x, y, [255, 255, 255, 0]);
}
}
}
image.save(fileName);
}
);```
I have already
```cfg
add_unsafe_child_process_permission fivem-greenscreener
add_unsafe_worker_permission fivem-greenscreener
add_filesystem_permission fivem-greenscreener write fivem-greenscreener
add_unsafe_child_process_permission screenshot-basic
add_unsafe_worker_permission screenshot-basic
add_filesystem_permission screenshot-basic write screenshot-basicImportancy
Unknown
Area(s)
FXServer
Specific version(s)
Server 26389 Windows
Additional information
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugtriageNeeds a preliminary assessment to determine the urgency and required actionNeeds a preliminary assessment to determine the urgency and required action
