2
我使用beatbox和python将文档上传到Salesforce,并且文件连接正确,但文件中包含的数据完全损坏。通过Beatbox上传附件到Salesforce API
def Send_File():
import beatbox
svc = beatbox.Client() # instantiate the object
svc.login(login1, pw1) # login using your sf credentials
update_dict = {
'type':'Attachment',
'ParentId': accountid,
'Name': 'untitled.txt',
'body':'/Users/My_Files/untitled.txt',
}
results2 = svc.create(update_dict)
print results2
输出为:
00Pi0000005ek6gEAAtrue
所以事情经过以及即将到来,但是当我去到Salesforce的记录00Pi0000005ek6gEAA并查看该文件的文件的内容是:
˝KÆœ Wøä ï‡Îä˜øHÅCj÷øaÎ0j∑ø∫{b∂Wù
我不知道是什么原因导致了这个问题,我找不到发生在其他人身上的任何情况
链接到SFDC Documentation on uploads