Reset Password
Check your e-mail for further instructions.
Reset
Name
getthumb
Auth
yes
Description
Get a thumbnail of a file
Takes the same parameters as getthumblink, but returns the thumbnail over the current API connection.
Getting thumbnails from API servers is generally NOT faster than getting them from storage servers.
It makes sense only if you are reusing the (possibly expensive to open SSL) API connection.URL
https://api.pcloud.com/getthumb
Required
Parameter | Description |
fileid | int id of the file for thumb |
path | string filepath to the file for thumb |
size | string WIDTHxHEIGHT |
Optional
Parameter | Description |
crop | int If set, then the thumb will be cropped |
type | string If set to png, then the thumb will be in png format |
Code | Description |
1000 | Log in required. |
1004 | No fileid or path provided. |
1014 | Thumb can not be created from this file type. |
1015 | Please provide valid thumb size. Width and height must be divisible either by 4 or 5 and must be between 16 and 2048 (1024 for height). |
2000 | Log in failed. |
2002 | A component of parent directory does not exist. |
2003 | Access denied. You do not have permissions to preform this operation. |
2009 | File not found. |
2010 | Invalid path. |
3001 | Could not create thumb from the given file. |
4000 | Too many login tries from this IP address. |
5002 | Internal error, no servers available. Try again later. |