This discussion is similar to "Difficulty Serving Static Image with
static_files handler". I responded to Marzia directly on that
discussion but she said:

***********************
Hi Joe,

I no longer work on the App Engine team at Google.  Please follow up
on this issue on theforum, and a member of the App Engine team should
be able to help.

-Marzia
***********************
So here's my response to Marzia (Her original message follows.):

I was having inexplicable troubles as well, trying to serve static
midi files from a static subirectory. I scratched my head, re-read the
Python Application Configuration pages, reminded myself of how much I
love (NOT) regex's :). Anyway, after many hours, I discovered the
problem.

Most of the MANY links in my referring html look like:
<a href="/mids/ SPIRIT%20OF%20LIFE.mid">. The associated file name
that works on my windows machine by my webBrowsing to a local file and
on my personal website (FreeBSD-4.10-RELEASE Apache/ 1.3.41) is
"SPIRIT OF LIFE.mid".  Anyway, one of the links had no %20s in it and
I finally discovered that it worked just fine. Is there something that
I'm missing or don't know about that will make this mapping work? It
will be really hard to rename all the files and links.

Thanks for any help you can give.

Joe
********************
Here's Marzia's original message in "Difficulty Serving Static Image
with static_files handler" that I responded to:

On Dec 15 2008, 2:42 pm, Marzia Niccolai <ma...@google.com> wrote:
> Hi Dylan,
>
> Hmmmm, this is confusing because it works perfectly for me.  I made a simple
> application:
>
> static
>  - photos
>   - folder
>     - image.jpg
>   - folder2
>     - image.jpg [different image]
>
> With this in my app.yaml:
> - url: /photos/(.*)/(.*\.(gif|jpg))
>   static_files: static/photos/\1/\2
>   upload: static/photos/(.*)/(.*\.(gif|jpg))
>
> And it works perfectly.
>
> The only thing I can think of that may not make this work is if you have
> another handler in your app.yaml that also matches those files and is
> defined before this one that is causing this issue.
>
> So this could 404 if your app.yaml looks like this:
> -------------------------app.yaml-------------------------
> - url: /.*
>   script: main.py
>
> - url: /photos/(.*)/(.*\.(gif|jpg))
>   static_files: static/photos/\1/\2
>   upload: static/photos/(.*)/(.*\.(gif|jpg))
> -------------------------end-------------------------
>
> Because the first handler matches all URLs.
>
> Hope this helps, if not, perhaps attach your entire app.yaml file?
>
> -Marzia
>

> On Sun, Dec 14, 2008 at 12:11 AM, Dylan Lorimer <write2dy...@gmail.com>wrote:

>
>
>
> > Hi,
>
> > In my app.yaml I have the following:
>
> > - url: /photos/(.*)/(.*\.(gif|png|jpg))
> >  static_files: static/photos/\1/\2
> >  upload: static/photos/(.*)/(.*\.(gif|png|jpg))
>
> > My application has images that I've uploaded per the following
> > directory structure:
>
> > application root
> >  - static
> >      - photos
> >          -folder_1/image_1.jpg
> >          -folder_1/image_2.jpg
>
> >          -folder_2/image_3.jpg
>
> > etc etc
>
> > For the life of me I can't seem to serve these images successfully.
> > Any URL hit to:www.myapp.com/photos/photo_folder_name/image_name.jpg
> > results in a 404 not found.
>
> > I'm certain this is an issue with my app.yaml static handler but can't
> > figure it out. Any help is SUPER appreciated. It's possible that they
> > are not being uploaded due to an error in the upload directive, but I
> > don't think that's the case.
>
> > Thanks much.



--~--~---------~--~----~------------~-------~--~----~
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.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to