Beispiel #1
0
def copy(url):
    if url:
        filename = os.path.basename(url)
        Exif.copyImage(url, os.path.join(settings.PHOTO_DIR,filename))
        return (os.path.join(settings.PHOTO_URL, filename), True)
    else:
        return (url, False)
Beispiel #2
0
def copy(url):
    if url:
        filename = os.path.basename(url)
        Exif.copyImage(url, os.path.join(settings.PHOTO_DIR, filename))
        return (os.path.join(settings.PHOTO_URL, filename), True)
    else:
        return (url, False)
Beispiel #3
0
def download_photo(url):
    # copy photo to local storage and rotate if necessary
    try:
        filename = os.path.basename(url)
        Exif.copyImage(url, os.path.join(settings.PHOTO_DIR,filename))
        return os.path.join(settings.PHOTO_URL,filename)
    except:
        return url
Beispiel #4
0
def download_photo(url):
    # copy photo to local storage and rotate if necessary
    try:
        filename = os.path.basename(url)
        Exif.copyImage(url, os.path.join(settings.PHOTO_DIR,filename))
        return os.path.join(settings.PHOTO_URL,filename)
    except:
        return url