Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9123071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:15:04+00:00 2026-06-17T06:15:04+00:00

I want to create a process using GAE by which, given a url, a

  • 0

I want to create a process using GAE by which, given a url, a file is downloaded and stored as a blob in the blobstore. Once this is done I want to pass this blob along as POST data to a second url. However for this second part to work I need to be able to open the blob as a file instance.

I’ve figured out how to do the first part

from __future__ import with_statement
from google.appengine.api import files

imagefile = urllib2.urlopen('fileurl')
# Create the file
file_name = files.blobstore.create(mime_type=imagefile.headers['Content-Type'])
# Open the file and write to it
with files.open(file_name, 'ab') as f:
    f.write(imagefile.read())
# Finalize the file. Do this before attempting to read it.
files.finalize(file_name)
# Get the file's blob key
blob_key = files.blobstore.get_blob_key(file_name)

But I can’t figure out how to do the second part. So far I’ve tried

  1. ffile = files.open(files.blobstore.get_file_name(blob_key), 'r')

  2. from google.appengine.ext import blobstore

    ffile = blobstore.BlobReader(blob_key)
    
  3. from google.appengine.ext import blobstore

    ffile = blobstore.BlobInfo.open(blobstore.BlobInfo(blob_key))
    

All of which gives Falsefor isinstance(ffile, file).

Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:15:05+00:00Added an answer on June 17, 2026 at 6:15 am

    ffile = blobstore.BlobReader(blob_key) works. However, the returned object has only a file-like interface; it dosn’t extend a file-class. Therefore, the isinstance test wont work. Try something like if ffile and "read" in dir( ffile ).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a dictionary containing array and send it to GAE using
I want to create and then open a txt file using the ShellExecute command.
I want to create a pie chart using JPgraph. in a php file i've
Problem decription: I want to create a file upload screen using JSP. The screen
I want to create copies of a process using fork() in C. I cant
I've written a C# application which uses System.Diagnostics.Process class to create a process, using
I want to create database import using .sql file with java then I found
I want to create a periodic process with inner cycles, using javascript. Each cycle
i'm new at C Programming (i learned c++) i want to create a process
I want to know what framework/Interface/API's Set is best to use to create multi-process

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.