When using the remoteUpload server side export with the 'blob' dataType, any parameters passed in the options.fields table are ignored. This makes it impossible to use services that require additional form fields for authentication.
local cloud_name = "cloud_name"
local upload_preset = "unsigned_preset"
local upload_url = "https://api.cloudinary.com/v1_1/" .. cloud_name .. "/image/upload"
exports.screencapture:remoteUpload(source, upload_url, {
encoding = "webp",
formField = "file",
filename = "screenshot.webp",
fields = {
upload_preset = upload_preset,
},
headers = {}
}, function(res)
end, "blob")