dmanty45 / walkaround

Automatically exported from code.google.com/p/walkaround
Apache License 2.0
0 stars 0 forks source link

Attachment upload doesn't work when running locally on localhost:8080 #44

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. runant run
2. clear cookies for your fully-qualified hostname port 8080, then go to 
localhost:8080
3. upload a file

What is the expected output?  What do you see instead?
The placeholder for the thumbnail keeps spinning, and the attachment title is 
"Upload failed".  Upload did not work.

Upload works fine when deployed.

The logs show that /upload succeeds but then say
INFO: Got /uploadresult but no one was logged in, redirecting.
and the browser's request to /uploadresult is redirected to a fake login page 
which doesn't parse as JSON.

It looks like the problem is that App Engine's 
LocalBlobstoreService.createUploadURL() always produces a fully-qualified 
hostname rather than using localhost or whatever was in the request; so, when 
working with localhost:8080, createUploadURL() will create a URL on a different 
domain, and the browser doesn't necessarily have auth cookies on that domain.

Upload on my fully-qualified hostname works.

What browser and browser version are you using?  On what operating system?
Chrome on Linux

What URL does your browser show when the problem occurs?  Did you compile
walkaround on your machine, or are you using a public instance?
running locally

Please use labels and text to provide additional information.

Original issue reported on code.google.com by oh...@google.com on 13 Jan 2012 at 10:14

GoogleCodeExporter commented 8 years ago

Original comment by oh...@google.com on 3 Apr 2012 at 9:38