
UNSOLVED
Atmos-PHP for PEER1 CloudOne - Creating, Listing & Uploading/Downloading Files
Hi all,
I'm using PEER1 CloudOne.
I can create an empty file in a PHP script using the atmos-php framework with this code:
$_files = new EsuRestApi( $host, $port, $uid, $secret );
$file = $_files->createObject( $acl = NULL, $metadata = NULL, $data = 'createObject data', $mimeType = 'text/plain');
echo 'Empty file created. The file id is '. $file .'';
How do you do this with the uploadHelper class?
Also, anybody know how to list files in the cloud via this framework via REST? I tried the following but got an error 1009.
$_files = new EsuRestApi( $host, $port, $uid, $secret );
try {
$_files->queryObjects('.jpg');
} catch (Exception $e) {
echo 'Error: ', $e->getMessage(), "\n";
echo 'Code: ', $e->getCode(), "\n";
}
That code returns:
Error: The method specified in the request is not allowed for the resource identified. Code: 1009
I don't even think I should post my uploadhelper code as it's obviously wrong...
Thanks!
Responses (3)
Solutions (0)

mirando
12 Posts
612
0
Posted July 15th, 2010 09:00
I was able to upload a file with the uploadHelper class to PEER 1 CloudOne storage:
I'm still working out the rest. Hope this helps somebody.