【发布时间】:2014-05-19 08:42:29
【问题描述】:
我正在使用 JavaScript API 将文件上传到 OneDrive。
<script>
$('#file-to-save').change(function(){
console.log ("Uploading");
fileaddress = $('#file-to-save').val();
var folder_id = 'folder.1d67c8c08569256a.1D67C8C08569256A!36156';
console.log(folder_id);
WL.upload({
path: folder_id,
element: 'file-to-save',
overwrite: 'rename'
}).then(
function(response) {
// Handle the response
$('#status').html("Upload complete. Getting shared link...");
// TODO: Get the file id
var file_id = response.id;
getSharedLink(file_id);
},
function(error) {
console.log("Error");
$('#status').html(error.error.message);
}
);
});
</script>
问题是文件上传是私人的,用户需要登录到他们的 MS 帐户才能查看它。是否可以通过 API 将隐私更改为公开?
【问题讨论】:
标签: javascript api onedrive