1. Tasks
  2. Delete File

Tasks

Delete File

The Delete File task deletes a file from the Stubber file system.

For cases of extreme sensitivity, the delete_file task can be used to remove a file completely from the Stubber file system.

Basic usage

loading...

Parameters

fileuuid
optional
string

The UUID of the file to be deleted.


fileuuids
optional
array

An array of UUIDs of the files to be deleted.


filename
optional
string

The name of the file to be deleted. This only works for files on the same stub where the task is executed.


filenames
optional
array

An array of filenames to be deleted. This only works for files on the same stub where the task is executed.


attachments
optional
array

An array of attachments to be deleted. This refers to the attachments of a stub or stubpost and can be referenced as:

  • ~~stub.attachments
  • ~~stubpost.attachments

This will delete all attachments of the stub or stubpost.


Result

loading...

Properties

fileuuid

integer

The UUID of the file that was deleted.


Examples

Request with interpolated fileuuid

loading...

Delete two specific files and all attachments of this stubpost

editor
        {
    "tasktype": "delete_file",
    "params": {
        "fileuuids": ["~~stub.data.private_file_fileuuid", "~~stub.data.public_file_fileuuid"]
        "attachments": "~~stubpost.attachments"
    }
}


      

Request with filename

loading...