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