summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2010-07-06 12:50:37 +0200
committerRobin Appelman <icewind1991@gmail.com>2010-07-06 12:50:37 +0200
commit9fe7f992d9323f4509d7fa7c0f895c22141dcc06 (patch)
tree4e7af7d9eb0414fa3b9aa5e71bc196667acbeba2 /files
parent761b54fc17aeedc77e07a5ec5ff8f412ea46e798 (diff)
downloadnextcloud-server-9fe7f992d9323f4509d7fa7c0f895c22141dcc06.tar.gz
nextcloud-server-9fe7f992d9323f4509d7fa7c0f895c22141dcc06.zip
Initial work on transering files between servers
Diffstat (limited to 'files')
-rwxr-xr-xfiles/api.php2
-rw-r--r--files/pull.php11
2 files changed, 13 insertions, 0 deletions
diff --git a/files/api.php b/files/api.php
index 014bbb56bbc..fa94a512547 100755
--- a/files/api.php
+++ b/files/api.php
@@ -72,6 +72,8 @@ if($arguments['action']){
echo 'false';
}
break;
+ case 'pull':
+ return OC_FILES::pull($arguments['source'],$arguments['token'],$arguments['dir'],$arguments['file']);
}
}
diff --git a/files/pull.php b/files/pull.php
new file mode 100644
index 00000000000..1cc82425845
--- /dev/null
+++ b/files/pull.php
@@ -0,0 +1,11 @@
+<?php
+$token=$_GET['token'];
+
+$file=sys_get_temp_dir().'/'.'remoteCloudFile'.$token;
+if(file_exists($file) and is_readable($file) and is_writable($file)){
+ readfile($file);
+ unlink($file);
+}else{
+ header("HTTP/1.0 404 Not Found");
+}
+?> \ No newline at end of file