Browse Source

Fixes issue #37

tags/v1.4.1
Isaac Bythewood 8 years ago
parent
commit
5cb59746df
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      pinry/core/models.py

+ 1
- 1
pinry/core/models.py View File

@@ -14,7 +14,7 @@ from ..users.models import User
class ImageManager(models.Manager): class ImageManager(models.Manager):
# FIXME: Move this into an asynchronous task # FIXME: Move this into an asynchronous task
def create_for_url(self, url): def create_for_url(self, url):
file_name = url.split("/")[-1]
file_name = url.split("/")[-1].split('#')[0].split('?')[0]
buf = StringIO() buf = StringIO()
response = requests.get(url) response = requests.get(url)
buf.write(response.content) buf.write(response.content)


Loading…
Cancel
Save