Media.deleteFile

Use this method to delete file(s) from the system.

This method removes any cached data for media.getFileInfo ONLY if media.getFileInfo is called with no user ID and returnComments set to false. If media.getFileInfo is called with a user ID or returnComments set to true then stale data may be returned until the cache is refreshed. This will occur automatically after a few minutes.


Syntax

void media.deleteFile ( mixed id )

Arguments

NameTypeRequiredDefault valueDescription
idmixedRequirednoneThis method expects a single media ID or an array with IDs.

Response

The response of the deleteFile method.

NameTypeDescriptionPossible Values
resultINTWill return 1 on the successful request and response of this method.1

Sample Response

Sample REST Response
http://api.filemobile.com/services/rest/media/deleteFile?id=[MID]APIKEY=[APIKEY]
http://api.filemobile.com/services/rest/media/deleteFile?id[]=[MID1]&id[]=[MID2]&APIKEY=[APIKEY]
<?xml version="1.0" encoding="UTF-8"?>
<result>1</result>
Sample JSON Response
{
    "status": true,
    "result": 1
}

Code examples

0 comments

Be the first to comment on deleteFile.

Add a Comment

  • captcha