400 error uploading file via multi-part form (PHP App Engine and SDK)

57 views
Skip to first unread message

cR

unread,
Aug 24, 2014, 10:46:20 PM8/24/14
to google-a...@googlegroups.com
Hi, 

I'd really love some help with this. 

Using the same upload example from here; https://developers.google.com/appengine/docs/php/googlestorage/user_upload, (stored to default bucket) I'm get 400 - bad request in the response. Oddly, the file is stored as verified in the Blob Viewer tool, but the file isn't available to the $_FILES array in php. I'm therefore unable to deduce a link immediately to the uploaded file. 

I thought this was just with the SDK, but it happens on a deployed app too. 

Kindly share any thoughts or help on this. If anyone could try code from the above link (with and without the default bucket), that would be good too. 

Thanks!

 

Mars Lan

unread,
Aug 25, 2014, 5:09:13 PM8/25/14
to google-a...@googlegroups.com
Did you use a custom domain for your app? Or appspot.com?

Vinny P

unread,
Aug 26, 2014, 12:23:11 AM8/26/14
to google-a...@googlegroups.com
On Sun, Aug 24, 2014 at 9:46 PM, cR <cecil...@gmail.com> wrote:
Using the same upload example from here; https://developers.google.com/appengine/docs/php/googlestorage/user_upload, (stored to default bucket) I'm get 400 - bad request in the response. Oddly, the file is stored as verified in the Blob Viewer tool, but the file isn't available to the $_FILES array in php. 

Kindly share any thoughts or help on this. If anyone could try code from the above link (with and without the default bucket), that would be good too. 



Can you call var_dump($_FILES); and see if anything is stored there? Is it empty?

Also call getDefaultGoogleStorageBucketName() and see if the text returned matches the default bucket name.

 
 
-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

Vinny P

unread,
Aug 26, 2014, 12:25:43 AM8/26/14
to google-a...@googlegroups.com
On Mon, Aug 25, 2014 at 11:22 PM, Vinny P <vinn...@gmail.com> wrote:
Also call getDefaultGoogleStorageBucketName() and see if the text returned matches the default bucket name.


And by that, I mean check to see if the function reports the same name as the bucket name you're using within your code.
Reply all
Reply to author
Forward
0 new messages