1
votes

i have a form on a page using CloudStorageTools::createUploadUrl for the action...

i set up my bucket to receive the file, and that works fine... i see the $_FILE populated, and the [tmp_name] is set to a "gs://bucket/key" URL... i can use move_uploaded_file to copy the file with a different name, so my app definitely has access to the bucket and can make changes...

when i use file_get_contents on the same filepath, i get nothing... fopen returns false.

i tried to get the public URL to the file and then requesting it with an HTTPS stream, but that returned

<?xml version='1.0' encoding='UTF-8'?><Error><Code>AccessDenied</Code><Message>Access denied.</Message></Error>

i tried adding all the google api OAuth tokens and API version, but it still returned AccessDenied.

is something wrong on GAE? how can i retrieve an uploaded file's contents?

1
1. Can you see the uploaded file in the cloud console view of your bucket? 2. Can you access the uploaded file using the public url in a web browser?IanGSY
yes and yes... i can even use move_uploaded_file to rename the file in my bucket, so i'm sure my application has all the proper accessCloudward Build

1 Answers