Differences

This shows you the differences between two versions of the page.

Link to this comparison view

phpdevsdk:download_a_file [2011/03/16 15:27]
facelessuser
phpdevsdk:download_a_file [2011/12/29 22:10] (current)
Line 1: Line 1:
-=====General:===== +=====Download File=====
-The API usually returns an xml structure containing return data.  This layout may vary from command to command, but this is generally what I have found. +
-  <commands> +
-     <command> +
-       <type>Name of command</type> +
-       <result>usually 1 or 0</result> +
-       <message>Some additional return data</message> +
-     </command> +
-  </commands> +
-   +
-other kinds of XML returns +
-  <records> +
-    <metarecord> +
-    // contains some meta information about result set +
-    </metarecord> +
-    <record> +
-    // data +
-    </record> +
-    <record> +
-    // data +
-    </record> +
-  </records> +
- +
-=====Download File=====+
   http://host/downloadfile?filepath=directory_path/file_name&filename=file_name   http://host/downloadfile?filepath=directory_path/file_name&filename=file_name
  
Line 31: Line 8:
   * type: downloadfile   * type: downloadfile
   * result: 1 for success and 0 for fail (this doesn't really need to be checked because the file will download and you will see it, or it won't)   * result: 1 for success and 0 for fail (this doesn't really need to be checked because the file will download and you will see it, or it won't)
- 
-=====Upload File===== 
-  http://host/upload?appname=explorer&path=/directory_path&expandzip=numerical_value 
- 
-**Inputs:** 
-  * path: Path to upload to 
-  * expandzip: is for expanding uploaded zip files (1 = expand, 0 = no expand) 
-**Outputs:** 
-  * Success or failure message 
- 
-=====Zip Files in a Folder===== 
-  http://host/core/startzip?path=directory_path&time=epoch_time 
-  http://host/core/zipstatus?id=zip_id&time=epoch_time 
- 
-**Note:** files will be zipped with the following name Tonido_Zip_<zip job id>.zip 
- 
-**Inputs (startzip):** 
-  * path: Path to folder containing contents to zip 
-  * time: epoch time in seconds 
-**Outputs (startzip):** 
-  * type: startzip 
-  * result: 1 for success and 0 for fail 
-  * message: id for zip job 
- 
-**Inputs (zipstatus):** 
-  * id: id for zip job returned by startzip 
-  * time: epoch time in seconds 
-**Outputs (zipstatus):** 
-  * type: zipstatus 
-  * result: 1 for finished and 0 for still zipping 
-  * message: current files that were zipped (files are separated with the following delimiter: [b]nline_[/b]) 
- 
-=====Abort Zip===== 
-To Do 
- 
-=====Download Folder===== 
-  http://host/core/startzip?path=directory_path&time=epoch_time 
-  http://host/core/zipstatus?id=zip_id&time=epoch_time 
-  http://host/core/downloadaszip?id=zip_id 
- 
-**Note:** See Zipping Files in Folder to view inputs and outputs for startzip and zipstatus 
- 
-**Inputs (downloadaszip):** 
-  * id: zip job id returned from startzip 
-**Outputs (startzip):** 
-  * Todo: (doesn't really need to be checked.  Download will start or it won't) 
- 
-=====Get Thumbnails===== 
-To Do 
- 
-***More to come***