Actions25
- Account Actions
- Analytics Actions
- Job Status Actions
- Location Actions
- Media Actions
- Post Actions
- User Actions
- Workspace Actions
Media → Upload File
AI-generatedOverview
This node operation uploads a file to the Publer media library or directly to social networks. It is useful for automating media uploads in social media management workflows, such as uploading images or videos from binary data within n8n to be used in posts or stored in a workspace's media library. For example, users can upload a file from an incoming binary property and choose whether to save it in the media library or upload it directly to networks without storing a copy.
Use Case Examples
- Uploading an image file from a binary property to the media library of a specific workspace.
- Uploading a video file directly to social networks without saving it in the media library.
Properties
| Name | Meaning |
|---|---|
| Workspace | The workspace that owns the media library where the file will be uploaded. Defaults to the workspace configured in the credentials. |
| Binary Property | The name of the incoming binary property that holds the file data to upload. This is required to locate the file data in the input item. |
| Direct Upload | Whether to upload the file directly to social networks without storing a copy in the media library. |
| Save in Media Library | Whether to save the uploaded file in the media library. |
Output
JSON
id- The unique identifier of the uploaded media file.url- The URL where the uploaded media file can be accessed.name- The name of the uploaded media file.type- The type of media uploaded (e.g., image, video).direct_upload- Indicates if the file was uploaded directly to networks without storing a copy.in_library- Indicates if the file is saved in the media library.
Dependencies
- Publer API
Troubleshooting
- If the specified binary property is missing or empty, the node will throw an error indicating the binary property is missing on the input item. Ensure the binary property name matches the incoming data.
- If the workspace ID is not resolved correctly, the API request may fail. Verify the workspace ID is valid and accessible with the provided credentials.
- Errors related to invalid file data or upload failures may occur if the binary data buffer cannot be retrieved or the API rejects the upload. Check the file data and API permissions.