We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
rhernandez8305
7 years agoHelpful | Level 6
DownloadAsync error
I tried download all folders/files from DropBox.Api but I received this error:
Value should match pattern '\A(?:(/(.|[\r\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?))\z'
Parameter name: path
My code is:
using (var response = await dbx.Files.DownloadAsync("/folder/File.ext" ))
{
//code
}
Thanks a lot!!!
Thanks for your reply, I resolved it. This is part of my code:
I get the "PathLower" property from the metadata's files:
the path's format is: "/folder/MyFile.ext"
using (var dbx = new DropboxClient("KeyApi"))
{
var list = await dbx.Files.ListFolderAsync(string.Empty, recursive: true);
foreach (var item in list.Entries.Where(i => i.IsFile))
{
string urlFile = item.AsFile.PathLower;
using (var response = await dbx.Files.DownloadAsync(urlFile))
{
//code
}
}
}Thanks a lot.
- Greg-DBDropbox StaffThat error is indicating that the `path` value you supplied doesn't match the expected format. The value "/folder/File.ext" would match, but it looks like that's just an example. Can you share the exact value you're supplying when you get this error?
For example, if you're supplying a file path, make sure it starts with a "/".- rhernandez8305Helpful | Level 6
Thanks for your reply, I resolved it. This is part of my code:
I get the "PathLower" property from the metadata's files:
the path's format is: "/folder/MyFile.ext"
using (var dbx = new DropboxClient("KeyApi"))
{
var list = await dbx.Files.ListFolderAsync(string.Empty, recursive: true);
foreach (var item in list.Entries.Where(i => i.IsFile))
{
string urlFile = item.AsFile.PathLower;
using (var response = await dbx.Files.DownloadAsync(urlFile))
{
//code
}
}
}Thanks a lot.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 27 minutes agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!