Example #1
0
// This was an attempt, to "catch" the uploaded blob
// and store it by myself into the datastore -
// where I would be able to delete it.
// But this failed - the actual blob data does not even reach the appengine.
// Only the blob-info data.
func dataStoreClone(w http.ResponseWriter, r *http.Request,
	blob0 *BlobInfo, otherFormFields url.Values) {

	return

	wbl := dsu.WrapBlob{}
	wbl.Category = "print"
	wbl.Name = otherFormFields["title"][0] + " - " + otherFormFields["descr"][0]
	wbl.Name += " - " + util.LowerCasedUnderscored(blob0.Filename)
	wbl.Desc = fmt.Sprintf("%v", blob0.BlobKey)
	wbl.S = blob0.ContentType
	if len(otherFormFields["post_field_file"]) > 0 {
		filecontent := otherFormFields["post_field_file"][0]
		wbl.VByte = []byte(filecontent)
	}
	keyX2 := "bl" + time.Now().Format("060102_1504-05")
	_, errDS := dsu.BufPut(w, r, wbl, keyX2)
	util_err.Err_http(w, r, errDS, false)

}