When i submit upload form, following error is displayed. How can i solve it?
404 Not Found The resource could not be found.
python code
class DashboardHandler(webapp2.RequestHandler):
def get(self):
upload_url = blobstore.create_upload_url('/upload')
class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
def post(self):
upload_files = self.get_uploads('file')
blob_info = upload_files[0]
self.redirect('/serve/%s' % blob_info.key())
app = webapp2.WSGIApplication([
('/(mysitename)/upload', UploadHandler),
debug=True)
HTML(template)
<form action={{upload_url}} method="post" enctype="multipart/form-data">
<input type="file">
<input type="submit" name="UPLOAD">
</form>
i'm using an original domain, so the error URL is as follow.
http://www.(MySiteName).me/_ah/upload/AMmfu6b74Szd5r2OSm0DYxF4sZ4tQNW7JjIDqaNwagaKRvy4eptgqc-WVRKIBd6w_SBFnpN7tjVaNujW_H7U5ftmmYT34fTnD_TjsyawkE1VTj6OrYCpsxQwO7RRnLj6yOfWLOdJbg6A/ALBNUaYAAAAAUpGu2FSrupya8eMAP-afGYgToYnHa9aD/You don't give many details so it is hard to diagnose. Are you using a blobstore_handlers.BlobstoreUploadHandler
instead of the regular RequestHandler
? If so, please show that handler and the relevant portion of your WSGIApplication
setup.