我正在嘗試使用Google應用引擎製作帶有圖片的簡單網站。我無法做到。無法在Google App Engine網站上添加圖片
我的app.yaml代碼如下:
application: simplegraph-007
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /image/.*
static_dir: static/image/.*
- url: .*
script: main.app
libraries:
- name: webapp2
version: "2.5.2"
我Main.py樣子:
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.out.write("<img src ='/image/Ris.jpeg'/>")
app = webapp2.WSGIApplication([
('/', MainHandler)
], debug=True)
我的日誌是在這裏:
INFO 2015-10-19 18:46:39,111 module.py:786] default: "GET /image/Ris.jpeg HTTP/1.1" 404 154
希望對大家有幫助來自你。
謝謝,
我認爲這是早期問題的重複。 http://stackoverflow.com/questions/33175530/unable-to-see-image-on-google-app-engine-web –