This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BlobMigrationHandler(YourCustomHandler): | |
" List out the blob keys so we can migrate them. " | |
def get(self): | |
CHUNK = 300 | |
cursor = self.request.GET.get('cursor') | |
q = blobstore.BlobInfo.all() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def migrate_blobstore(entity): | |
" Migrate entities with blob fields from another app. " | |
import urllib, mimetypes | |
from google.appengine.api import files | |
modified = False | |
fields = entity.get_blob_fields() | |
logging.debug("Fields are: %s" % fields) | |
for field in fields: |
NewerOlder