Name
getziplink
Auth
yes
Description
Receive a zip file link for files in the user's filesystem.
Recognizes the same parameters as getzip.
Expects as parameter a defined tree.
Unlike getzip, returns a download link(s) the same way getfilelink does - returns path, hosts and expire.
Note : This call is less efficient than getzip as the zip archive is created on our servers and only then you get a download link. So as fast as our servers are, it may take time to create a large archive.
The parameter maxspeed may be used if you wish to limit the download speed (in bytes per second) for this link.URL
https://api.pcloud.com/getziplink
Optional
Parameter | Description |
maxspeed | int limit the download speed (in bytes per second) for this link. |
forcedownload | int If it is set, the content-type will be 'application/octet-stream', if not - 'application/zip'. |
filename | string If it is provided, this is sent back as 'Content-Disposition' header, forcing the browser to adopt this filename when downloading the file. Filename is passed unaltered, so it MUST include the .zip extension. |
timeoffset | string desired time offset |
Output
On success it will return array hosts with servers that have the file.
The first server is the one we consider best for current download.
In path there will be a request you should send to server.
You need to construct the URL yourself by concatenating http:// or https:// with one of the hosts (first one) and the path.
Example
{ result: 0, path: "/dFZ73Y0ZtdPJZ3lZZhipqC7ZNVZZmb0ZHQp8Ed85S8HL874JvyYgMY8C1tbk/My%20picture.jpg", expires: "Thu, 03 Oct 2013 01:06:49 +0000", hosts: [ "c63.pcloud.com", "c1.pcloud.com" ] }
Code | Description |
1000 | Log in required. |
1017 | Invalid 'folderid' provided. |
1018 | Invalid 'fileid' provided. |
2000 | Log in failed. |
2009 | File not found. |
2011 | Requested speed limit too low, see minspeed for minimum. |
4000 | Too many login tries from this IP address. |
5001 | Internal upload error. |
5002 | Internal error, no servers available. Try again later. |