Question: I am trying to use dropbox as media sotrage. I am trying to implement through django-storages. 

**settings.py**

```
DEFAULT_FILE_STORAGE = 'storages.backends.dropbox.DropBoxStorage'
DROPBOX_OAUTH2_TOKEN = 'token'
DROPBOX_ROOT_PATH = '/media/'

```

**models.py**

```
logo = models.ImageField(upload_to=r'logo/%Y/%m/')
image = models.ImageField(upload_to=r'photos/%Y/%m/',
 help_text='Image size: Width=1080 pixel. Height=1920 pixel',)

```

**error**

Request Method: | POST

Request URL: | <http://127.0.0.1:8000/add>

Django Version: | 2.1.8

Exception Type: | ValidationError

Exception Value: | 'D:/media/10506738\_10150004552801856\_220367501106153455\_o.jpg' did not match pattern '(/(.|[\r\n])|id:.)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.\*)?)'

**console**

dropbox.stone\_validators.ValidationError: 'D:/media/10506738\_10150004552801856\_220367501106153455\_o.jpg' did not match pattern '(/(.|[\r\n])|id:.)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.\*)?)'

I can't figure out why this error is happening?

Answer: 
This error message is coming from the Dropbox API, indicating that the "path" supplied for the Dropbox API call doesn't have the expected format. E.g., if you're uploading a file, the "path" you supply would be the path in the Dropbox account where you want to put the uploaded data.

You're supplying the value:

`D:/media/10506738_10150004552801856_220367501106153455_o.jpg`

(That seems to be a local Windows filesystem path.)

The Dropbox path you supply should instead look something like:

`/media/10506738_10150004552801856_220367501106153455_o.jpg`

(That would be a path relative to the Dropbox root. It doesn't have a drive letter.)

You'll need to dig in to your code to see where/why that incorrect type of path is being supplied to Dropbox.
The issue is with the Windows operating system Path. I tried with the same settings in Ubuntu. It's working there flawlessly.