I'm using django-storages with Amazon S3. I see the following error somewhat intermittently:
name = self._normalize_name(self._clean_name(name))\n\n File \"/app/.heroku/venv/lib/python2.7/site-packages/storages/backends/s3boto.py\", line 237, in _normalize_name\n name)\n\nSuspiciousOperation: Attempted access to 'https:/plantvillage.s3.amazonaws.com/avatar/hans9_avatar.jpg'
Note the single /
after https:
.
Does anyone know why this shows up? It doesn't happen all the time. I can successfully do this in other cases.
file.url
is processed differently thanfile.name
. I've also done this, but it seems more like a hack than an actual solution. Are there any sources which indicate this is indeed correct, besides the fact that this method does not raise an exception? – Aerate