Reputation: 11
I am creating a Google App Engine application with multiple modules. I have followed Google's documentation and have separate modules which have their own addresses and work as expected.
I am implementing user file upload according to the documentation and working with the latest (1.9.25) version of the SDK. (https://cloud.google.com/appengine/docs/php/googlestorage/user_upload)
My app has several modules including:
My file upload form is located in the admin module. When I generate a file upload URL using:
CloudStorageTools::createUploadUrl('/upload' , $options)
and submit the file upload form, App Engine is POSTing the file to the specified path (/upload), however it is directing the request to the default module, which I do not want. After the file is uploaded, the page loads the route from the default module, which is not setup to receive that request. (SDK console also shows POST to 'default' upon uploading a file in the browser)
If I and generating a file upload URL from the admin module, presenting the form in the same module, why is it POSTing to the default module?
Maybe I'm missing something here, but I've searched all of the Google documentation and can't seem to find anything that suggests that file uploads can only be processed by the default app engine module.
Is this expected behaviour? I appreciate any help.
Upvotes: 0
Views: 42
Reputation: 11
On further searching, it appears to be a bug in the dev server, as outlined here: https://code.google.com/p/googleappengine/issues/detail?id=10658
Even though it's relating to the blobstore API, I believe the dev server uses the blobstore during CloudStorage API requests. Hopefully it will get fixed.
Upvotes: 1