Onedrive业务上传API:带空格的文件名变为+ [英] Onedrive business upload API : A file name with spaces becomes +

查看:235
本文介绍了Onedrive业务上传API:带空格的文件名变为+的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我将urlencode文件名 



所以我要求网址是:



xxx-my.sharepoint.com/_api/v2.0/drive/items/root:/test+test.txt:/content


< p style ="padding-right:0px; font-size:15px; clear:both; color:#242729; font-family:Arial,'Helvetica Neue',Helvetica,sans-serif; line-height:21.6667px">
文件名成为  test + test.txt  当
i上传名为test test.txt的文件


但是这个API不处理url编码
准确 



onedrive api 可以正确运行



如何用PHP保存准确的文件名




$





解决方案

我按照RFC 3986标准编码url解决了这个问题


before upload i will urlencode the filename 

so i request url is:

xxx-my.sharepoint.com/_api/v2.0/drive/items/root:/test+test.txt:/content

file name become test+test.txt when i upload a file named test test.txt

but this API isn't deal with url encoding accurately .

onedrive api can run correctly

how can i keep the accurate file name with PHP

解决方案

I am in accordance with RFC 3986 standard to encoding url solved this problem


这篇关于Onedrive业务上传API:带空格的文件名变为+的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆