deleteFile()

Pixelsilk API function to delete a file from an album--requires the access-libraries permission
Parameters:
type: the type of the album
filename: the name of the file
albumName: the name of the album

Output:
The function deleteFile returns void.

C# Example:
string type = "albumType";
string filename = "fileName";
string albumName = "albumName";
DeleteFile(type, filename, albumName);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/deleteFile HTTP/1.1
HOST: www.example.com
Content-Length: 181
Content-Type: application/x-www-form-urlencoded
Cookie: auth=0222B262F6AB...46E8D58BEE4E

Request Data:
Unencoded Data:
json={
   "type":"binary",
   "filename":"testfile.txt",
   "albumName":"FileAlbum1"
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json=%7b%0d%0a+++...%22%0d%0a%7d&token=7AdbNHZQBtwc...TEK8UvSUQ%3d

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=7C6CE213384E...2F0C40D1211; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:
{}

JavaScript Example:
Method Call:
pixelsilk2.deleteFile(input, callback);

Input Object:
{
    type:"Binary",
    filename:"APIMethodsWorksheet.docx",
    albumName:"FileAlbum1"
}

Returned Data:
{}

Back to Files »