Reputation: 2050
I'm using Google App Engine to develop a project based upon WordPress.
When I upload a file using the default media uploader, I get a corrupt image. Instead of the image contents being the file I uploaded, they are akin to:
Content-Type: image/png
Content-Length: 816567
Content-MD5: NzAxZDY5YmRkN2ZlYzMyNmYxMGYzNTUxNmY5MzcyODk=
X-AppEngine-Cloud-Storage-Object: /gs/bucket-name/fake-YNmYY5YfmzAxRkY5MzcyOM==
content-disposition: form-data; name="async-upload"; filename="the_filename_of_the_file_i_uploaded.png"
X-AppEngine-Upload-Creation: 2014-08-08 12:00:00.000000
When I run the following in the interactive console:
print_r(file_get_contents("gs://bucket-name/fake-YNmYY5YfmzAxRkY5MzcyOM=="));
...The contents of the png file comes out.
What's going on?
In case it helps, to start the App Engine server, I run:
dev_appserver.py app-dev/app.yaml --php_executable_path=/usr/bin/php-cgi
The Wordpress installation is running the Google App Engine plugin.
Upvotes: 0
Views: 158
Reputation: 2050
This problem is a symptom of this problem:
php google app engine uploading files on local dev server
The dev server puts uploads in /tmp/
(like PHP normally does) instead of converting the upload to a gs://
file
Upvotes: 1