Lambda 不支持太大的 Base64 - C#

发布于 2025-01-14 14:42:41 字数 633 浏览 5 评论 0原文

我正在使用 .Net 6.0 在 lambda 中创建一个函数,该函数需要接收 base64 字符串(图像)。

但是,如果图像很小(例如:100 x 100),我只能让它接收这个 base64 字符串,当图像比这大得多时,Lambda 不理解 JSON 并返回 null。

我正在使用AWS测试工具来执行测试,如何获得更大的BASE64字符串?

public bool FunctionHandler(DadosApData dadosApData, ILambdaContext context)
{
    
    LambdaLogger.Log("Inicio dos testes");

    var teste = _enviarMicrosoftFunction.TestarEnvio(dadosApData);

    return true;
}

这是我的模型:

    public class DadosApData
{
    public string Base64Foto { get; set; }
    public string Email { get; set; }
    public string ReColaborador { get; set; }
}

I'm creating a function in a lambda with .Net 6.0 that needs to receive a base64 string (Image).

However, I can only get it to receive this base64 String if the image is small (Example: 100 x 100), when the image is much larger than that, Lambda doesn't understand the JSON and returns null.

I'm using the AWS test tool to perform the tests, how can I get a larger BASE64 String?

public bool FunctionHandler(DadosApData dadosApData, ILambdaContext context)
{
    
    LambdaLogger.Log("Inicio dos testes");

    var teste = _enviarMicrosoftFunction.TestarEnvio(dadosApData);

    return true;
}

This is my model:

    public class DadosApData
{
    public string Base64Foto { get; set; }
    public string Email { get; set; }
    public string ReColaborador { get; set; }
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文