Reputation: 1598
I'm running a Google App locally.
I have a folder with static images I want to pull. Folder is called "images" (it's in the root)
In my app.yaml I have this code:
- url: /images
static_files: images
upload: images
But when the app is running and trying to grab an image I get 404:
localhost:8080/images/truck.png
What am I doing wrong? Thank you.
Upvotes: 0
Views: 76
Reputation: 2653
Try Using this:
application: test
version: 1
runtime: python27
api_version: 1
threadsafe: false
handlers:
- url: /resources
static_dir: resources
- url: /.*
script: main.app
libraries:
- name: jinja2
version: latest
Ensure that the resources url is before the /.* url.
I have my project set up as follows
/test
/test/resources
/test/resources/images
/test/resources/images/myimage.png
app.yaml
main.py
Upvotes: 3