[google-appengine] Re: Image upload problem with GAE SDK running wordpress

2016-01-21 Thread 'Ed Nunez' via Google App Engine
There's no custom code written to upload the image data into the blobstore 
by my team.  It's just an observation of how GAE SDK / wordpress starter 
project is configured.  We are working with the local dev environment which 
doesn't leverage GCS directly (perhaps the sdk is simulating the GCS via 
the blobstore, I haven't confirmed that).

At this point in our project, testing on actual google clould platform 
isn't an option.  I was hoping the SDK is just misconfigured somehow and 
just needed minor adjustment to get images urls to render as expected.

On Wednesday, January 20, 2016 at 2:16:00 PM UTC-5, Christian F. Howes 
wrote:
>
> hmmm, i don't have experience with wordpress and blobstore, we are using 
> wordpress and Google Cloud Storage and it works just fine with the (i think 
> it is google provided) wordpress GCS plugin.  would switching to that be an 
> option for you?
>
> On Wednesday, January 20, 2016 at 9:30:55 AM UTC-8, Ed Nunez wrote:
>>
>> I'm looking for assistance with an issue I've encountered trying to view 
>> uploaded images in wordpress powered by google app engine SDK.
>> The images seem to be properly stored in the blobstore provided by the 
>> SDK but the image URLs seem to be wrong.
>>
>> Please see my stackoverflow question for more details.
>>
>>
>> http://stackoverflow.com/questions/34665653/uploaded-images-url-are-incorrect
>>
>> Respond here or there, wherever you prefer. Thanks!
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/1651f598-7b01-48b7-ad4d-53669c0bae72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Image upload problem with GAE SDK running wordpress

2016-01-21 Thread Nick (Cloud Platform Support)
Hey Ed,

Unfortunately it seems that you're not providing enough technical 
information to allow people to make inferences about what might be the 
cause of the issue. The use of language to describe your tests / 
development / environment is ambiguous: you speak in your linked Stack 
Overflow Q about both the SDK's blobstore, related to the SDK and a 
development environment, and the Developers Console, which is related to 
the production environment. It's unclear how these two environments relate 
in your report. 

There are a huge number of possibilities hiding in the details you don't 
specify, and with a platform as varied and complex as the Cloud Platform or 
even just App Engine, let alone Wordpress, it's very difficult for others 
to assist if you aren't as precise and detailed as possible. I would 
suggest editing your Stack Overflow question to be more clear, provide the 
details others have asked for, and also to give as much information about 
your environment and set-up steps which you haven't linked. For example, 
what does "Target Application is Wordpress 4.3.1" mean in this context? You 
should link some of the documentation relevant to what you're doing.

With all this advice, I think you will be much closer to seeing an 
effective community support experience on Stack Overflow. In general this 
forum (Google Groups) is not meant for discussion of specific issues, so 
cross-posting a Stack Overflow Q here is quite unnecessary. Stack 
Overflow is the best place for such issues, since there is a much larger 
community of developers able to assist you, and in a format designed for 
such an interaction. This forum is meant more for general / high level 
discussion of the platform and services.

Regards,

Nick

On Wednesday, January 20, 2016 at 12:30:55 PM UTC-5, Ed Nunez wrote:
>
> I'm looking for assistance with an issue I've encountered trying to view 
> uploaded images in wordpress powered by google app engine SDK.
> The images seem to be properly stored in the blobstore provided by the SDK 
> but the image URLs seem to be wrong.
>
> Please see my stackoverflow question for more details.
>
>
> http://stackoverflow.com/questions/34665653/uploaded-images-url-are-incorrect
>
> Respond here or there, wherever you prefer. Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/a13d6062-6ba7-4013-a0df-3b4ef15c41ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Image upload problem with GAE SDK running wordpress

2016-01-20 Thread Christian F. Howes
hmmm, i don't have experience with wordpress and blobstore, we are using 
wordpress and Google Cloud Storage and it works just fine with the (i think 
it is google provided) wordpress GCS plugin.  would switching to that be an 
option for you?

On Wednesday, January 20, 2016 at 9:30:55 AM UTC-8, Ed Nunez wrote:
>
> I'm looking for assistance with an issue I've encountered trying to view 
> uploaded images in wordpress powered by google app engine SDK.
> The images seem to be properly stored in the blobstore provided by the SDK 
> but the image URLs seem to be wrong.
>
> Please see my stackoverflow question for more details.
>
>
> http://stackoverflow.com/questions/34665653/uploaded-images-url-are-incorrect
>
> Respond here or there, wherever you prefer. Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/08a6fe0c-5a53-478f-934a-8b97a30b9961%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Image upload

2011-11-12 Thread Ernesto Oltra
GWT is compiled to JavaScript: it can't do what JavaScript can't either. 
The trick of FileUpload is sending the form (and the file) in a hidden 
iframe; that way you haven't to reload the whole page. There is a good 
reason not to use FormPanel?

Ikai has a blog post with some sample code using GWT to upload images to 
appengine:
  
http://ikaisays.com/2010/09/08/gwt-blobstore-the-new-high-performance-image-serving-api-and-cute-dogs-on-office-chairs/
and the demo:
  http://ikai-photoshare.appspot.com/

El sábado 12 de noviembre de 2011 16:32:07 UTC+1, Deepak Singh escribió:


 Hi,

 I need to upload an image to GAE server and store it in datastore.
 I looked for many options and found that FileUpload widget released with 
 GWT 2.4 can do it but the restriction is that this widget must be used with 
 FormPanel.
 but i dont want to use formPanel.

 Can anyone suggest me the best possible way w.r.t GWT + GAE

 I am using GWT 2.4, GAE 1.5.5

 Thanks
 Deepak Singh


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/BGrAiR5lzbUJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Image Upload

2010-10-28 Thread Massimiliano
I can't understand.
I have removed my serve class and I have added the lines as for your
example:

 frasi.link = blob_info.key()
frasi.Tlink = images.get_serving_url(frasi.link, 94)
 frasi.Glink = images.get_serving_url(frasi.link)

With this lines the upload url returns an error (he can't find the page). if
I remove this two lines, the upload url is working well, but storing only
the blob_info.key(). There is something I can't see.




2010/10/28 Barry Hunter barrybhun...@gmail.com

 You could store the url in the datastore (after updating your model
 definion to include the field :)

 
  frasi.gruppo = self.request.get('domain')
  frasi.link = blob_info.key()
 frasi.servinglink = images.get_serving_url(frasi.link, 32)
  frasi.put()
 .

 Then would just in the template

 img src={{ elemento.servinglink }} width=10%/br/a


 ... or you could call get_serving_url in the code that renders the
 template. You don't need a 'Serve' handler at all :)



 On 27 October 2010 22:22, Massimiliano massimiliano.pietr...@gmail.com
 wrote:
  I do understand this, but my html is:
  img src=/serve/{{ elemento.link }} width=10%/br/a
  How have I to modify the html?
  I tried with an Iframe, but doesn't work.
  class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
  def post(self):
  upload_files = self.get_uploads('File')
  blob_info = upload_files[0]
  self.request.get('Nick')
  frasi = FRASI()
  frasi.frase = self.request.get('Frase')
  frasi.gruppo = self.request.get('domain')
  frasi.link = blob_info.key()
  frasi.put()
  self.redirect(/ + self.request.get('domain') + /fanpage)
  class ServeHandler(webapp.RequestHandler):
  def get(self, resource):
  self.response.headers['Content-Type'] = image/png
  self.response.out.write(images.get_serving_url(resource, 32))
  2010/10/27 Barry Hunter barrybhun...@gmail.com
 
  get_serving_url is a URL to the file directly - you use it in the
  actual image tag.
 
  self.response.out.write('img
 src=%s/'%images.get_serving_url(resource,
  32))
 
 
 
  On 27 October 2010 19:28, Massimiliano massimiliano.pietr...@gmail.com
 
  wrote:
   I'm trying to serve the images with this code, but it's not working
   class ServeHandler(webapp.RequestHandler):
   def get(self, resource):
   self.response.headers['Content-Type'] = image/png
   self.response.out.write(images.get_serving_url(resource, 32))
   Could you help me?
   2010/10/27 Massimiliano massimiliano.pietr...@gmail.com
  
   I have understand very well the Stephen solution. I'm just fighting
   with
   the serve part of the code...
  
   2010/10/27 ego008 ego...@gmail.com
  
   you can do it step by step here
  
  
  
 http://code.google.com/intl/en/appengine/docs/python/images/usingimages.html
  
GAE Geek http://gaefons.appspot.com/
  
   --
   You received this message because you are subscribed to the Google
   Groups
   Google App Engine group.
   To post to this group, send email to
   google-appeng...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
   For more options, visit this group at
   http://groups.google.com/group/google-appengine?hl=en.
  
  
  
   --
  
   My email: massimiliano.pietr...@gmail.com
   My Google Wave: massimiliano.pietr...@googlewave.com
  
  
  
   --
  
   My email: massimiliano.pietr...@gmail.com
   My Google Wave: massimiliano.pietr...@googlewave.com
  
   --
   You received this message because you are subscribed to the Google
   Groups
   Google App Engine group.
   To post to this group, send email to
 google-appeng...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
   For more options, visit this group at
   http://groups.google.com/group/google-appengine?hl=en.
  
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 
 
 
 
  --
 
  My email: massimiliano.pietr...@gmail.com
  My Google Wave: massimiliano.pietr...@googlewave.com
 
  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this 

Re: [google-appengine] Re: Image Upload

2010-10-28 Thread Massimiliano
Could you help me? I can't upload files!!!
This is my code:

--
upurl = blobstore.create_upload_url('/upload')
--
form method=post action={{ upurl }} enctype=multipart/form-data/
 Upload a picture: input type=file name=File/br
Caption: input type=text name=Frase/
 input type=hidden name=domain value={{ domain }}/
input type=submit/
/form
--
class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
 def post(self):
upload_files = self.get_uploads('File')
blob_info = upload_files[0]
 self.request.get('Nick')
frasi = FRASI()
frasi.frase = self.request.get('Frase')
 frasi.gruppo = self.request.get('domain')
frasi.link = blob_info.key()
 frasi.Tlink = images.get_serving_url(frasi.link, 94)
frasi.Glink = images.get_serving_url(frasi.link, 400)
 frasi.put()
self.redirect(/ + self.request.get('domain') + /fanpage)

2010/10/28 Massimiliano massimiliano.pietr...@gmail.com

 I can't understand.
 I have removed my serve class and I have added the lines as for your
 example:

  frasi.link = blob_info.key()
 frasi.Tlink = images.get_serving_url(frasi.link, 94)
  frasi.Glink = images.get_serving_url(frasi.link)

 With this lines the upload url returns an error (he can't find the page).
 if I remove this two lines, the upload url is working well, but storing only
 the blob_info.key(). There is something I can't see.




 2010/10/28 Barry Hunter barrybhun...@gmail.com

 You could store the url in the datastore (after updating your model
 definion to include the field :)

 
  frasi.gruppo = self.request.get('domain')
  frasi.link = blob_info.key()
 frasi.servinglink = images.get_serving_url(frasi.link, 32)
  frasi.put()
 .

 Then would just in the template

 img src={{ elemento.servinglink }} width=10%/br/a


 ... or you could call get_serving_url in the code that renders the
 template. You don't need a 'Serve' handler at all :)



 On 27 October 2010 22:22, Massimiliano massimiliano.pietr...@gmail.com
 wrote:
  I do understand this, but my html is:
  img src=/serve/{{ elemento.link }} width=10%/br/a
  How have I to modify the html?
  I tried with an Iframe, but doesn't work.
  class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
  def post(self):
  upload_files = self.get_uploads('File')
  blob_info = upload_files[0]
  self.request.get('Nick')
  frasi = FRASI()
  frasi.frase = self.request.get('Frase')
  frasi.gruppo = self.request.get('domain')
  frasi.link = blob_info.key()
  frasi.put()
  self.redirect(/ + self.request.get('domain') + /fanpage)
  class ServeHandler(webapp.RequestHandler):
  def get(self, resource):
  self.response.headers['Content-Type'] = image/png
  self.response.out.write(images.get_serving_url(resource, 32))
  2010/10/27 Barry Hunter barrybhun...@gmail.com
 
  get_serving_url is a URL to the file directly - you use it in the
  actual image tag.
 
  self.response.out.write('img
 src=%s/'%images.get_serving_url(resource,
  32))
 
 
 
  On 27 October 2010 19:28, Massimiliano 
 massimiliano.pietr...@gmail.com
  wrote:
   I'm trying to serve the images with this code, but it's not working
   class ServeHandler(webapp.RequestHandler):
   def get(self, resource):
   self.response.headers['Content-Type'] = image/png
   self.response.out.write(images.get_serving_url(resource, 32))
   Could you help me?
   2010/10/27 Massimiliano massimiliano.pietr...@gmail.com
  
   I have understand very well the Stephen solution. I'm just fighting
   with
   the serve part of the code...
  
   2010/10/27 ego008 ego...@gmail.com
  
   you can do it step by step here
  
  
  
 http://code.google.com/intl/en/appengine/docs/python/images/usingimages.html
  
GAE Geek http://gaefons.appspot.com/
  
   --
   You received this message because you are subscribed to the Google
   Groups
   Google App Engine group.
   To post to this group, send email to
   google-appeng...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
   For more options, visit this group at
   http://groups.google.com/group/google-appengine?hl=en.
  
  
  
   --
  
   My email: massimiliano.pietr...@gmail.com
   My Google Wave: massimiliano.pietr...@googlewave.com
  
  
  
   --
  
   My email: massimiliano.pietr...@gmail.com
   My Google Wave: massimiliano.pietr...@googlewave.com
  
   --
   You received this message because you are subscribed to the Google
   Groups
   Google App Engine group.
   To post to this group, send email to
 google-appeng...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
   For more options, visit this group at
   http://groups.google.com/group/google-appengine?hl=en.
  
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Google App Engine group.
  To post to this group, send email to 

Re: [google-appengine] Re: Image Upload

2010-10-27 Thread Massimiliano
I have understand very well the Stephen solution. I'm just fighting with the
serve part of the code...


2010/10/27 ego008 ego...@gmail.com

 you can do it step by step here


 http://code.google.com/intl/en/appengine/docs/python/images/usingimages.html


 http://code.google.com/intl/en/appengine/docs/python/images/usingimages.html
  GAE Geek http://gaefons.appspot.com/

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




-- 

My email: massimiliano.pietr...@gmail.com
My Google Wave: massimiliano.pietr...@googlewave.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Image Upload

2010-10-27 Thread Barry Hunter
get_serving_url is a URL to the file directly - you use it in the
actual image tag.

self.response.out.write('img src=%s/'%images.get_serving_url(resource, 32))



On 27 October 2010 19:28, Massimiliano massimiliano.pietr...@gmail.com wrote:
 I'm trying to serve the images with this code, but it's not working
 class ServeHandler(webapp.RequestHandler):
 def get(self, resource):
 self.response.headers['Content-Type'] = image/png
 self.response.out.write(images.get_serving_url(resource, 32))
 Could you help me?
 2010/10/27 Massimiliano massimiliano.pietr...@gmail.com

 I have understand very well the Stephen solution. I'm just fighting with
 the serve part of the code...

 2010/10/27 ego008 ego...@gmail.com

 you can do it step by step here

 http://code.google.com/intl/en/appengine/docs/python/images/usingimages.html

  GAE Geek http://gaefons.appspot.com/

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



 --

 My email: massimiliano.pietr...@gmail.com
 My Google Wave: massimiliano.pietr...@googlewave.com



 --

 My email: massimiliano.pietr...@gmail.com
 My Google Wave: massimiliano.pietr...@googlewave.com

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Image Upload

2010-10-27 Thread Massimiliano
I do understand this, but my html is:

img src=/serve/{{ elemento.link }} width=10%/br/a

How have I to modify the html?
I tried with an Iframe, but doesn't work.

class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
def post(self):
 upload_files = self.get_uploads('File')
 blob_info = upload_files[0]
 self.request.get('Nick')
 frasi = FRASI()
 frasi.frase = self.request.get('Frase')
 frasi.gruppo = self.request.get('domain')
 frasi.link = blob_info.key()
 frasi.put()
 self.redirect(/ + self.request.get('domain') + /fanpage)

class ServeHandler(webapp.RequestHandler):
 def get(self, resource):
 self.response.headers['Content-Type'] = image/png
 self.response.out.write(images.get_serving_url(resource, 32))

2010/10/27 Barry Hunter barrybhun...@gmail.com

 get_serving_url is a URL to the file directly - you use it in the
 actual image tag.

 self.response.out.write('img src=%s/'%images.get_serving_url(resource,
 32))



 On 27 October 2010 19:28, Massimiliano massimiliano.pietr...@gmail.com
 wrote:
  I'm trying to serve the images with this code, but it's not working
  class ServeHandler(webapp.RequestHandler):
  def get(self, resource):
  self.response.headers['Content-Type'] = image/png
  self.response.out.write(images.get_serving_url(resource, 32))
  Could you help me?
  2010/10/27 Massimiliano massimiliano.pietr...@gmail.com
 
  I have understand very well the Stephen solution. I'm just fighting with
  the serve part of the code...
 
  2010/10/27 ego008 ego...@gmail.com
 
  you can do it step by step here
 
 
 http://code.google.com/intl/en/appengine/docs/python/images/usingimages.html
 
   GAE Geek http://gaefons.appspot.com/
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Google App Engine group.
  To post to this group, send email to google-appengine@googlegroups.com
 .
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 
 
 
  --
 
  My email: massimiliano.pietr...@gmail.com
  My Google Wave: massimiliano.pietr...@googlewave.com
 
 
 
  --
 
  My email: massimiliano.pietr...@gmail.com
  My Google Wave: massimiliano.pietr...@googlewave.com
 
  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




-- 

My email: massimiliano.pietr...@gmail.com
My Google Wave: massimiliano.pietr...@googlewave.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Image Upload

2010-10-27 Thread Barry Hunter
You could store the url in the datastore (after updating your model
definion to include the field :)


 frasi.gruppo = self.request.get('domain')
 frasi.link = blob_info.key()
frasi.servinglink = images.get_serving_url(frasi.link, 32)
 frasi.put()
.

Then would just in the template

img src={{ elemento.servinglink }} width=10%/br/a


... or you could call get_serving_url in the code that renders the
template. You don't need a 'Serve' handler at all :)



On 27 October 2010 22:22, Massimiliano massimiliano.pietr...@gmail.com wrote:
 I do understand this, but my html is:
 img src=/serve/{{ elemento.link }} width=10%/br/a
 How have I to modify the html?
 I tried with an Iframe, but doesn't work.
 class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
 def post(self):
 upload_files = self.get_uploads('File')
 blob_info = upload_files[0]
 self.request.get('Nick')
 frasi = FRASI()
 frasi.frase = self.request.get('Frase')
 frasi.gruppo = self.request.get('domain')
 frasi.link = blob_info.key()
 frasi.put()
 self.redirect(/ + self.request.get('domain') + /fanpage)
 class ServeHandler(webapp.RequestHandler):
 def get(self, resource):
 self.response.headers['Content-Type'] = image/png
 self.response.out.write(images.get_serving_url(resource, 32))
 2010/10/27 Barry Hunter barrybhun...@gmail.com

 get_serving_url is a URL to the file directly - you use it in the
 actual image tag.

 self.response.out.write('img src=%s/'%images.get_serving_url(resource,
 32))



 On 27 October 2010 19:28, Massimiliano massimiliano.pietr...@gmail.com
 wrote:
  I'm trying to serve the images with this code, but it's not working
  class ServeHandler(webapp.RequestHandler):
  def get(self, resource):
  self.response.headers['Content-Type'] = image/png
  self.response.out.write(images.get_serving_url(resource, 32))
  Could you help me?
  2010/10/27 Massimiliano massimiliano.pietr...@gmail.com
 
  I have understand very well the Stephen solution. I'm just fighting
  with
  the serve part of the code...
 
  2010/10/27 ego008 ego...@gmail.com
 
  you can do it step by step here
 
 
  http://code.google.com/intl/en/appengine/docs/python/images/usingimages.html
 
   GAE Geek http://gaefons.appspot.com/
 
  --
  You received this message because you are subscribed to the Google
  Groups
  Google App Engine group.
  To post to this group, send email to
  google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 
 
 
  --
 
  My email: massimiliano.pietr...@gmail.com
  My Google Wave: massimiliano.pietr...@googlewave.com
 
 
 
  --
 
  My email: massimiliano.pietr...@gmail.com
  My Google Wave: massimiliano.pietr...@googlewave.com
 
  --
  You received this message because you are subscribed to the Google
  Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




 --

 My email: massimiliano.pietr...@gmail.com
 My Google Wave: massimiliano.pietr...@googlewave.com

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Image Upload

2010-10-26 Thread Stephen


On Oct 22, 10:11 pm, Massimiliano massimiliano.pietr...@gmail.com
wrote:
 Dear All,
 I'm building a gallery and I'm allowing users to upload their images, but I
 want all the images with a specific width in the blobstore. I'm trying to
 using the Image Api, but I can't understand how.

 This is my code, could someone help me?

 class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
  def post(self):
 upload_files = self.get_uploads('File')
 blob_info = upload_files[0]
  self.request.get('Nick')
 frasi = FRASI()
 frasi.frase = self.request.get('Nick')
  frasi.link = blob_info.key()
 frasi.put()
 self


The old way to do it:

  
http://code.google.com/appengine/docs/python/images/overview.html#Transforming_Images_from_the_Blobstore


The new way to do it:

  
http://code.google.com/appengine/docs/python/images/functions.html#Image_get_serving_url

  example: 
http://blog.tinisles.com/2010/08/app-engines-high-performance-image-serving/

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Image Upload

2010-10-26 Thread Massimiliano
Great! Thanks!
This is really easy to be used!

2010/10/26 Stephen sdea...@gmail.com



 On Oct 22, 10:11 pm, Massimiliano massimiliano.pietr...@gmail.com
 wrote:
  Dear All,
  I'm building a gallery and I'm allowing users to upload their images, but
 I
  want all the images with a specific width in the blobstore. I'm trying to
  using the Image Api, but I can't understand how.
 
  This is my code, could someone help me?
 
  class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
   def post(self):
  upload_files = self.get_uploads('File')
  blob_info = upload_files[0]
   self.request.get('Nick')
  frasi = FRASI()
  frasi.frase = self.request.get('Nick')
   frasi.link = blob_info.key()
  frasi.put()
  self


 The old way to do it:


 http://code.google.com/appengine/docs/python/images/overview.html#Transforming_Images_from_the_Blobstore


 The new way to do it:


 http://code.google.com/appengine/docs/python/images/functions.html#Image_get_serving_url

  example:
 http://blog.tinisles.com/2010/08/app-engines-high-performance-image-serving/

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




-- 

My email: massimiliano.pietr...@gmail.com
My Google Wave: massimiliano.pietr...@googlewave.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Image Upload

2010-10-26 Thread ego008
you can do it step by step here

http://code.google.com/intl/en/appengine/docs/python/images/usingimages.html

http://code.google.com/intl/en/appengine/docs/python/images/usingimages.html
 GAE Geek http://gaefons.appspot.com/

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.