1
我正在使用JavaScript API將文件上傳到OneDrive。OneDrive API上傳文件爲公開
<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將隱私更改爲公開?