{"Value should match pattern '\\A(?:(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?))\\z'\r\nParameter name: path"}
heres my code: try{ var result = await dbx.Sharing.CreateSharedLinkWithSettingsAsync(@E:/Dropbox/iCodesStorageDropbox/H11018304_MMCH/CF1- TR18-0000005-121212-JOSESAPANZAAMIDO.enc, null); var url = result.Url; MessageBox.Show(url);}catch(Exception ex){ MessageBox.Show(ex.ToString());}
I want to get my file dropbox link im using c# and Dropbox api
this is my c# code :
try{ var result = await dbx.Sharing.CreateSharedLinkWithSettingsAsync(@E:/Dropbox/iCodesStorageDropbox/H11018304_MMCH/CF1- TR18-0000005-121212-JOSESAPANZAAMIDO.enc, null); var url = result.Url; MessageBox.Show(url);}catch(Exception ex){ MessageBox.Show(ex.ToString());}
And this error message will show :
{"Value should match pattern '\\A(?:(/(.|[\\r\\n])*|id:.|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.?))\\z'\r\nParameter name: path"}
@iCodes I see that you're trying to call CreateSharedLinkWithSettingsAsync but it's failing because you're not providing a valid 'path' value. You're supplying a local path (starting with the local drive letter "E:/", and so on). When using the Dropbox API though, the paths you use should be relative to the root of the Dropbox (or app folder root if you're using an app registered for the app folder permission).
So, your path value should lookg like "/iCodesStorageDropbox/H11018304_MMCH/CF1- TR18-0000005-121212-JOSESAPANZAAMIDO.enc".
You can retrieve valid path values from the API itself, e.g., from Metadata.PathLower, as returned from ListFolderAsync, for instance.
@Greg-DB
Hello Greg
I follow your instruction but there is an error it says : "path/not_found/...."
Good Day Greg
Its working! thanks a lot