Delete both types of images (UserIcon and TransactionIcon)

The POST /Files/deleteIcon API method is used to delete an uploaded file associated with a transaction or a user avatar. Depending on whether a transactionId is provided, it will either remove the file related to a specific transaction or delete the user’s avatar.

Functionality:

  • Deletes the file associated with the provided transactionId. If transactionId is not provided, it deletes the user's avatar file.

Request Parameters:

  • transactionId (optional): The ID of the transaction associated with the file to be deleted. If this parameter is omitted, the API will delete the user avatar.

Key Features:

  • Conditional Deletion: Deletes a file based on the presence of transactionId. If no transactionId is provided, the user’s avatar is deleted instead.
  • Flexible Management: Provides a way to manage and clean up both transaction-related files and user avatars efficiently.
  • Error Handling: Includes responses to handle cases where the file or avatar is not found or if the request is invalid.
📘

This API is useful for managing and removing files related to transactions or user profiles, ensuring that unnecessary or outdated files are properly handled.

Body Params

Request needs for delete TransactionIcon only

string | null
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses
200

returns Ok() when image was deleted

500

Can't delete image due to internal error

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json