question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

django-cloudinary-storage does not anticipate Windows paths

See original GitHub issue

If a document is named using Windows styled path, the _save method causes problems.

def _save(self, name, content):
    # name is path\to\some\image\image.jpg on Windows machine
    name = self._prepend_prefix(name)
    # name becomes media/path\to\some\image\image.jpg if `settings.MEDIA_URL` is /media/
    ...

At the end, the resulting filename on cloudinary is something like media/\path\to\some\image\image_asdfghjk.jpg/ causing cloudinary to complain.

I think it will be nice if django-cloudinary-storage also works well on Windows. I can supply a fix which makes sure the name variable in _save is in unix style.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
tundebabzycommented, Jan 11, 2017

Here are snapshots of the error.

t t2 t3

By default, zinnia uploads to a directory named ‘uploads’ concatenated with the year, month and day the image was saved hence in this particular case - 'uploads\zinnia\2017\01\11'.

Let me know if you need any more information.

0reactions
klis87commented, Jan 12, 2017

Thank you for your pull request. I added 1 comment to it, please review it, thanks in advance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

This backend doesn't support absolute paths. #30 - GitHub
I am trying to upload an image following the documentation but getting the error : This backend doesn't support absolute paths.
Read more >
Image Transformations for Developers - Cloudinary
Learn how to dynamically transform images with one line of code: crop, resize, add borders and background, face detection, rich image ...
Read more >
django application using markdown and cloudinary
After dragging and dropping an image it saves the image to Cloudinary. But the image path in the markdown field is not correct....
Read more >
Clustering 4000 Stack Overflow tags with BigQuery k-means
Now get ready for some SQL magic. BigQuery ML does a good job of hot-encoding strings, but it doesn't handle arrays as I...
Read more >
Simple index - piwheels
... jsonf django-simple-coupons django-tinymcewrapper leroque-bagd1k dia datasette-jupyterlite tlstrust there-is-no-spoon robotframework-lsp pastebin-mirror ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found