1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2026-03-02 04:09:18 +00:00

add base64 as format for read results

This commit is contained in:
Falk Werner
2019-02-10 22:18:22 +01:00
parent 53ed822457
commit 2b7d938315
3 changed files with 11 additions and 5 deletions

View File

@@ -4,6 +4,7 @@
#include <string.h>
#include <limits.h>
#include <jansson.h>
#include <libwebsockets.h>
#include "wsfs/jsonrpc/server.h"
@@ -25,6 +26,10 @@ static wsfs_status wsfs_fill_buffer(
{
memcpy(buffer, data, copy_count);
}
else if (0 == strcmp("base64", format))
{
lws_b64_decode_string(data, buffer, copy_count);
}
else
{
status = WSFS_BAD;