steph
steph

Reputation: 103

Uploading a Single Static File to GAE Using app.yaml

Greetings,

I am trying to upload two single static files (a CSS & an HTML) to my appspot. However, they're in the root directory. I've tried static_dir and static_files but they don't work.

What I'm trying to do is to upload page.html to /site/ but I have it on root directory because I need it to be on the same dir as my app.yaml.

Here is a portion of my app.yaml:

- url: /page.html
  static_files: /\1.html
  upload: /page.html
- url: /page.css
  static_files: /\1.css
  upload: /page.css

Thank you for taking the time to read this.

Upvotes: 1

Views: 1398

Answers (1)

Wooble
Wooble

Reputation: 90037

\1 is replaced by the first matched group in the regular expression for the url. Your URL has no groups, so it will do nothing.

You can simply do:

- url: /page.html
  static_files: page.html
  upload: /page.html
- url: /page.css
  static_files: page.css
  upload: /page.css

Upvotes: 6

Related Questions