diff options
author | Robin Appelman <icewind1991@gmail.com> | 2010-07-06 12:50:37 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2010-07-06 12:50:37 +0200 |
commit | 9fe7f992d9323f4509d7fa7c0f895c22141dcc06 (patch) | |
tree | 4e7af7d9eb0414fa3b9aa5e71bc196667acbeba2 /files | |
parent | 761b54fc17aeedc77e07a5ec5ff8f412ea46e798 (diff) | |
download | nextcloud-server-9fe7f992d9323f4509d7fa7c0f895c22141dcc06.tar.gz nextcloud-server-9fe7f992d9323f4509d7fa7c0f895c22141dcc06.zip |
Initial work on transering files between servers
Diffstat (limited to 'files')
-rwxr-xr-x | files/api.php | 2 | ||||
-rw-r--r-- | files/pull.php | 11 |
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 |