/convertToBase64

This API endpoint allows you to convert a file from a given URL into a Base64 encoded string. You need to provide the URL of the file you want to convert, and the API will return the encoded data. This can be useful for embedding images or other files in web pages or applications without direct file handling.

Endpoint Information

Method: GET

Endpoint URL: https://node.nodetrigger.com/api/convertToBase64

Content Type: application/json

Example Requests

To convert a file to Base64, make a GET request to the endpoint with the URL of the file as a query parameter. Here’s an example request:


GET https://node.nodetrigger.com/api/convertToBase64?url=https://example.com/image.png

Notes

  • Ensure that the file URL is accessible and publicly available; the API needs to download the file to convert it.
  • The URL must be properly encoded when used in the query string.
  • If the URL is missing from the request, the API will return an error message indicating that no URL was provided.
  • In case of an internal issue or if the file is not accessible, the API will return a general error message along with details about the error.

“`