Overview
This node, named "Avito Upload Image," is designed to upload an image file to the Avito platform using a provided user token and user ID. It accepts an image encoded in Base64 format along with its filename, sends this data to Avito's API, and returns the response from the upload operation.
Common scenarios for this node include automating the process of adding images to Avito listings or managing media content on Avito programmatically. For example, it can be used in workflows that prepare product listings by uploading associated images directly from other systems or databases.
Properties
| Name | Meaning |
|---|---|
| Token | An authentication token required to authorize the upload request to Avito's API. |
| User Id | The identifier of the user account on Avito where the image will be uploaded. |
| file | The image file content encoded as a Base64 string. |
| fileName | The name of the image file being uploaded (e.g., "image.jpg"). |
Output
The node outputs a JSON array parsed from the response returned by the Avito API after uploading the image. This JSON typically contains details about the uploaded image such as its URL, status, or any metadata returned by Avito.
No binary data output is produced by this node; all output is structured JSON data representing the result of the upload operation.
Dependencies
- Requires access to Avito's API endpoint for image uploads.
- Needs a valid authentication token and user ID for the target Avito account.
- The node depends on an external module (
AvitoApi) which provides theuploadImagesmethod to handle the actual API call. - The input image must be provided as a Base64-encoded string.
Troubleshooting
- Invalid Token or User ID: If the token or user ID is incorrect or expired, the API call will fail. Ensure these credentials are valid and have the necessary permissions.
- Malformed Base64 File Data: Providing improperly encoded Base64 data will cause the upload to fail. Verify that the image is correctly encoded before passing it to the node.
- API Response Errors: Any errors returned by the Avito API (such as rate limits, invalid file types, or size restrictions) will be reflected in the JSON output. Review the API documentation for error codes and handling.
- Parsing Errors: If the response from the API is not valid JSON, the node will throw a parsing error. This might indicate an unexpected API response or network issues.
Links and References
- Avito API Documentation (for detailed API usage and authentication)
- Base64 Encoding Guide (to understand how to encode files properly)