Forum Discussion

Jason_gu's avatar
Jason_gu
New member | Level 2
4 years ago
Solved

stone.backends.python_rsrc.stone_validators.ValidationError

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?
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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.

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers804 PostsLatest Activity: 2 days ago
217 Following

If 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!