//echo "CREATE"; $new_me->create($props); } else { //echo "EDIT"; if ($APP['fs']->connect()) { $keyname = $GLOBALS['settings'][$APP['fs']->kind]['paths']['job-output']['@attributes']['value'] . "/" . sha1(microtime() . $new_me->str_value) . ".txt"; $bucket_name = $GLOBALS['settings'][$APP['fs']->kind][$APP['fs']->bucket_syntax()]['@attributes']['value']; $file_upload_success = $fs->create_object(false, $bucket_name, $keyname, $props['str_value'], "text/plain"); if ($file_upload_success) { $FILE_LOCATION = $APP['fs']->key_url($bucket_name, $keyname); $new_string = new strings(); $new_string->get_from_hashrange($new_me->str_value); if ($new_string->id != "undefined") { $props = array(); $props["val"] = $FILE_LOCATION; $new_string->update_raw($props); } } } // end if (able to connect to file storage // update latest cache //$JOB->obj_hf->update_raw(array("str_cache_latest"=>$sha1_string)); // existing entry for this setting //$new_me->update(array('str_value'=>$props['str_value'])); } } // end if (a non-standard me field) } // end for ( through each form field sent) } // end if (update)