- function putFile($description) {
-
- $url = $this->storage_uri;
- $fields = array('description' => urlencode($description),
-// 'fname' => urlencode($_POST['first_name']),
-// 'title' => urlencode($_POST['title']),
-// 'company' => urlencode($_POST['institution']),
-// 'age' => urlencode($_POST['age']),
-// 'email' => urlencode($_POST['email']),
-// 'phone' => urlencode($_POST['phone'])
+ function putFile($fields) {
+ $mdb2 = getConnection();
+
+ $fields = array('site_id' => urlencode($this->site_id),
+ 'site_key' => urlencode($this->site_key),
+ //'org_id' => urlencode($this->org_id), // TODO: obtain this properly.
+ //'org_key' => urlencode($this->org_key), // TODO: obtain this properly.
+ //'group_id' => urlencode($this->group_id), // TODO: obtain this properly.
+ //'group_key' => urlencode($this->group_key), // TODO: obtain this properly.
+ //'user_id' => urlencode($this->user_id), // TODO: obtain this properly.
+ //'user_key' => urlencode($this->user_key), // TODO: obtain this properly.
+ 'file_name' => urlencode($fields['file_name']),
+ 'description' => urlencode($fields['description']),
+ // TODO: add file content here, too. Will this work for large files?
+ //