Exemple #1
0
def storeImages(request):
    if request.method == 'POST':
        urlDictList = json.loads(request.POST['urlDictList'])
        for imgInfo in urlDictList:
            storage.storeImage(imgInfo)
        return HttpResponse(u'<htm><body>store images ok</body></html>')
    else:
        return HttpResponse(u'<htm><body>store images</body></html>')
Exemple #2
0
def storeImagesByGet(request, url):
    storageUrl = storage.storeImage(url)
    return HttpResponse(u'<html><body>store images ok, return:%s</body></html>' % storageUrl)