я хочу, чтобы загрузить список .txt, и держать их в пользовательской папке на SkyDriveзагрузки на определенный SkyDrive папки
как счета чьих-то -> SkyDrive -> пользовательской папки («TestFile»)
я попробовал
LiveOperationResult res = await client.BackgroundUploadAsync("me/skydrive/testfile", new Uri("/shared/transfers/" + t, UriKind.Relative),OverwriteOption.Overwrite);
,
, но он не работает вообще, это дает мне ошибку:
URL-адрес содержит путь «testfi le ', который не поддерживается.
Если мне нужно получить идентификатор папки для загрузки файла, как получить идентификатор?
вот мой код:
private async void button_Click(object sender, EventArgs e)
{
IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication();
var temptempout = new List<String>(isoStore.GetFileNames("*").ToList());
int total = temptempout.Count;
int now = 0;
if (temptempout.Count > 0)
{
ShowTextDebug.Text = "Uploaded 0 of " + total + " files";
foreach (String t in temptempout)
{
using (var fileStream = isoStore.OpenFile(t, FileMode.Open, FileAccess.Read))
{
try
{
LiveOperationResult res = await client.BackgroundUploadAsync("me/skydrive/testfile",
new Uri("/shared/transfers/" + t, UriKind.Relative),
OverwriteOption.Overwrite
);
}
catch (Exception err)
{
String rrtt = "there is an error while uploading txt " + err.Message;
MessageBox.Show(rrtt, "error", MessageBoxButton.OK);
}
}
now++;
ShowTextDebug.Text = "Uploaded " + now + " of " + total + " files";
}
ShowTextDebug.Text += "\nupload complete";
}
else
{
MessageBox.Show("no txt exist", "error", MessageBoxButton.OK);
}
}
спасибо за помощь мне