I can browse the static file in development server, but not on the app engine?

44 views
Skip to first unread message

hoamon

unread,
Oct 20, 2011, 8:08:13 AM10/20/11
to google-a...@googlegroups.com
My all *.css *.js and images that show well in my development sever, but not on the app engine server.

problem example:
 but
 http://sr-patentmap.appspot.com/media/main-e384fa89e7460c2de34365acda6705744576899c.js will get the 404.

Is it my problem?

below is my app.yaml:

application: sr-patentmap
version: 333-f8f21d691067-2
...

handlers:
- url: /favicon.ico
  static_files: favicon/favicon.ico
  upload: favicon/favicon.ico
  expiration: '3650d'

- url: /media/jquery-1.4.4.min.js
  static_files: media/jquery-1.4.4.min.js
  upload: /media/jquery-1.4.4.min.js
  expiration: '3650d'

- url: /media/jquery-ui-1.8.7.custom.min.js
  static_files: media/jquery-ui-1.8.7.custom.min.js
  upload: /media/jquery-ui-1.8.7.custom.min.js
  expiration: '3650d'

- url: /media/jquery-ui-1.8.7/redmond/jquery-ui-1.8.7.custom.css
  static_files: media/jquery-ui-1.8.7/redmond/jquery-ui-1.8.7.custom.css
  upload: /media/jquery-ui-1.8.7/redmond/jquery-ui-1.8.7.custom.css
  expiration: '3650d'

- url: /media/grid.locale-en.js
  static_files: media/grid.locale-en.js
  upload: /media/grid.locale-en.js
  expiration: '3650d'

- url: /media/grid.locale-zh_TW.js
  static_files: media/grid.locale-zh_TW.js
  upload: /media/grid.locale-zh_TW.js
  #TODO not translate yet

- url: /ho600_ajax/media/(.*)
  static_files: modules/ho600_ajax/media/\1
  upload: /ho600_ajax/media/(.*)

- url: /ho600_bugrecord/media/(.*)
  static_files: modules/ho600_bugrecord/media/\1
  upload: /ho600_bugrecord/media/(.*)

- url: /federated_auth/media/(.*)
  static_files: modules/federated_auth/media/\1
  upload: /federated_auth/media/(.*)

- url: /media/admin
  static_dir: django/contrib/admin/media/
  expiration: '0'

- url: /media/(.*)
  static_files: _generated_media/\1
  upload: /media/(.*)

- url: /__ajax__/
  script: djangoappengine/main/main.py

- url: /__.*__/.*
  script: djangoappengine/main/main.py
  login: admin

- url: /federated_auth/secret_login/
  script: djangoappengine/main/main.py
  login: admin

- url: /ho600_bugrecord/.*
  script: djangoappengine/main/main.py
  login: admin

- url: /_ah/queue/deferred
  script: djangoappengine/deferred/handler.py
  login: admin

- url: /_ah/stats/.*
  script: djangoappengine/appstats/ui.py
  login: admin

- url: /.*
  script: djangoappengine/main/main.py

Message has been deleted

hoamon

unread,
Oct 20, 2011, 9:51:50 PM10/20/11
to google-a...@googlegroups.com
I found the answer!  That's all my failure.

the "upload" value is wrong.

the bug version:

- url: /ho600_ajax/media/(.*)
  static_files: modules/ho600_ajax/media/\1
  upload: /ho600_ajax/media/(.*)

the right version:
- url: /ho600_ajax/media/(.*)
  static_files: modules/ho600_ajax/media/\1
  upload: modules/ho600_ajax/media/(.*)

This "upload" value only works for GAE, so I can view the all static files in my development server with wrong "upload" value.

BUT, might be the appengine SDK should not allow this.  It should keep the same effect in both two.
Reply all
Reply to author
Forward
0 new messages