简体   繁体   English

如何从salesforce上传大文件到第三方?

[英]How to upload large files from salesforce to third party?

I am able to send files up to 4.5 MB from salesforce using an HTTP request to AWS s3 bucket.我可以使用 HTTP 请求从 salesforce 向 AWS s3 存储桶发送最大 4.5 MB 的文件。 How can we send files as large as 50 MB from salesforce using HTTP request?我们如何使用 HTTP 请求从 salesforce 发送大至 50 MB 的文件?

You need to reverse the flow.您需要反转流程。 Apex has 6 MB RAM limit (12 MB if you use async apex, 36 MB if it's inbound email handler). Apex 有 6 MB RAM 限制(如果使用异步 apex,则为 12 MB,如果是入站电子邮件处理程序,则为 36 MB)。 50 MB * 133% (base64-encoding of binary payload) = 66.5 MB, way over the limit. 50 MB * 133%(二进制有效负载的 base64 编码)= 66.5 MB,超出限制。

Send some notification (custom callout? Platform event?) to other system, make it log in and pull the file using standard APIs, without invoking custom code and worrying about limits.向其他系统发送一些通知(自定义标注?平台事件?),使其登录并使用标准 API 拉取文件,而无需调用自定义代码并担心限制。 In the message you could send them the REST API download URLs ( {instance.my.salesforce.com}/services/data/v50.0/sobjects/ContentVersion/068.../VersionData ), if they access this in REST API they'd get binary payload in response.在消息中,您可以向他们发送 REST API 下载 URL( {instance.my.salesforce.com}/services/data/v50.0/sobjects/ContentVersion/068.../VersionData ),如果他们在 REST API 中访问它他们会得到二进制有效载荷作为响应。 If they'd rather have it base64-encoded - SOAP API query of this field in ContentVersion table might work better.如果他们更愿意使用 base64 编码 - ContentVersion表中此字段的 SOAP API 查询可能会更好。

See upload 20 mb file to 3rd Party services from Salesforce and https://stackoverflow.com/a/56268939/313628请参阅从 Salesforcehttps://stackoverflow.com/a/56268939/313628将 20 mb 文件上传到第 3 方服务

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用API​​从第三方Web应用程序在Salesforce中创建新案例 - How to Create New Case in Salesforce from third-party web application using API 向Salesforce向第三方应用程序提供用户数据 - Provide users data from Salesforce to third party application 如何通过第三方应用程序访问Salesforce API? - How to access Salesforce api through third party application? 从Salesforce上传20 mb文件到3rd Party服务 - upload 20 mb file to 3rd Party services from Salesforce 通过第三方站点的查询返回与帐户关联的所有Salesforce联系人 - Returning all Salesforce contacts associated with an account via query from third-party site 如何将文件从Salesforce上传到Google云端硬盘? - How to upload a file from Salesforce to Google drive? 使用salesforce作为第三方应用程序的身份验证服务和权利引擎 - Using salesforce as an authentication service and entitlements engine for third party application 将Salesforce生产数据复制到没有第三方工具/连接器的沙盒中 - Copy Salesforce Production data to a Sandbox without third party tools/connectors salesforce.com数据的第三方同步(联系人和约会) - Third-party synchronization of salesforce.com data (contacts and appointments) 第三方系统点击 salesforce API 生成的结果分页 - Pagination for results generated on hitting salesforce API by third party system
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM