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.

Trying to get this to work with django-storages

See original GitHub issue

I’m using Google Cloud Storage to serve up images.

class PhotoSerializer(serializers.ModelSerializer, TaggitSerializer):
    owner = serializers.CharField(source='owner.username', read_only=True)
    tags = TagListSerializerField()
    photo = VersatileImageFieldSerializer(
         sizes=[
            ('full_size', 'url'),
            ('thumbnail', 'thumbnail__250x250')
        ]
    )

When I try to upload images from my front end, I am getting errors like this:

google.cloud.exceptions.NotFound: 404 File does not exist: __sized__/img/u/1/pexels-photo-thumbnail-250x250-70.jpg

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
camflancommented, Feb 2, 2018

@EvanZ this should “just work” as expected. Using my fork, I dropped it in and didn’t change any of my application code 👍

0reactions
EvanZcommented, Feb 1, 2018

@respondcreate @camflan Neat! Do I need to use warming or should this fix “just work”?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon S3 — django-storages 1.13.1 documentation
Below provides some examples and common use cases to help you get started. This section assumes you have your AWS credentials configured, e.g....
Read more >
How to Upload Files to S3 Using Django Storages - YouTube
Learn Django - Implementing AWS S3 Storage for Static and Media files in Django · Django Mock Interview | Interview Questions for Senior...
Read more >
How do I set up django-storages? - Stack Overflow
Go to AWS web console, goto S3 (file storage). Create a new bucket. ... You can try setting and testing access to the...
Read more >
File storage API - Django documentation
If import_path is provided, get_storage_class will attempt to import the class or module from the given path and will return it if successful....
Read more >
How To Set Up Object Storage with Django - DigitalOcean
sudo apt-get update && sudo apt-get -y upgrade · sudo apt-get install python3 · sudo apt-get install -y python3-pip · virtualenv env ·...
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