I want to know is fileName to pass when you delete a file of gcs from gae/go.
Although passed "/gs/{bucketname}/{filename}", error message "RPC error UNKNOWN_ERROR:" is returned
package main
import (
"appengine"
"appengine/file"
"net/http"
)
func handle(w http.ResponseWriter, r *http.Request) {
c := appengine.NewContext(r)
file.Delete(c, "/gs/{bucketname}/{filename}")
}
I'm not an expert on Go but to work with Cloud Storage you need the Google Cloud Storage Go Client Library as indicated here [1].
Take a look at this sample code [2], more specifically to the deleteFiles() fuction. You can see that the function to the delete files is DeleteObject [3].
[1] https://cloud.google.com/appengine/docs/go/storage#google_cloud_storage
[2] https://cloud.google.com/appengine/docs/go/googlecloudstorageclient/getstarted
[3] http://godoc.org/google.golang.org/cloud/storage#DeleteObject