cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: stone.backends.python_rsrc.stone_validators.ValidationError

stone.backends.python_rsrc.stone_validators.ValidationError

Jason_gu
New member | Level 2
Go to solution
i have a imagefield in my model, but when i upload an image, i get this error:
stone.backends.python_rsrc.stone_validators.ValidationError: 'C:\nirpics\italian-tomato.jpg' did not match pattern '(/(.|[\r\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)'

I've searched for the solutions, but none of them does the work. Anyone can help me out?
1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Apologies for the trouble. It looks like there's an issue with the routing for that page when using a non-English locale. We'll look into it. For now, you should be able to work around that and access https://developers.dropbox.com/dbx-file-access-guide by temporarily switching to the "English (United States)" locale on https://www.dropbox.com/account/general (if signed in) or https://www.dropbox.com/login?cont=https%3A%2F%2Fwww.dropbox.com%2Fhome (if not signed in).

 

Anyway, the "path" parameter is the parameter you send to the API when uploading a file to specify where in the Dropbox filesystem to put the file. For example, when using the Python SDK, that's the "path" parameter on the files_upload method.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

When uploading a file to Dropbox via the API, you need to specify the path in Dropbox where you want to put the file. I see you're supplying a path 'C:\nirpics\italian-tomato.jpg', but that's a local Windows filesystem path, not a Dropbox path. For example, a Dropbox path would look like '/nirpics/italian-tomato.jpg'.

 

I recommend reading the File Access Guide for more information.

Jason_gu
New member | Level 2
Go to solution

Thank you Greg, the link's dead, but i can find the documentation. My problem is my code works well on Mac, but on Windows it doesn't. I've tried to locate where the variable 'path' is, but i failed.

 

Greg-DB
Dropbox Staff
Go to solution

Apologies for the trouble. It looks like there's an issue with the routing for that page when using a non-English locale. We'll look into it. For now, you should be able to work around that and access https://developers.dropbox.com/dbx-file-access-guide by temporarily switching to the "English (United States)" locale on https://www.dropbox.com/account/general (if signed in) or https://www.dropbox.com/login?cont=https%3A%2F%2Fwww.dropbox.com%2Fhome (if not signed in).

 

Anyway, the "path" parameter is the parameter you send to the API when uploading a file to specify where in the Dropbox filesystem to put the file. For example, when using the Python SDK, that's the "path" parameter on the files_upload method.

Need more support?