Skip to content

Ending of MP4 is changed to MP4S via API upload #1112

@shrubbery9902

Description

@shrubbery9902

📜 Description

I upload a mp4 via API (n8n). Storage is r2. Upload is working, but the file ending changes to mp4s in the response (see Screenshot). The path is valid, I can even access the mp4s-file. But afterwards, the post creation fails because mp4s is not a valid filetype.

Things used to work last week, I just updated postiz.

👟 Reproduction steps

Upload a MP4 via http Node in n8n:

{
  "nodes": [
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Configure me').item.json.postiz_api }}/posts",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "postizApi",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  "type": "schedule",\n  "date": "{{ \n  DateTime.now()\n    .plus({ days: 2 }) // morgen\n    .set({\n      hour: Math.floor(Math.random() * (12 - 7 + 1)) + 7, // zufällig 7–12\n      minute: 0,\n      second: 0,\n      millisecond: 0\n    })\n    .plus({ minutes: Math.floor(Math.random() * 31) }) // +0–30 Minuten\n    .toISO()\n}}",\n  "tags": [],\n  "shortLink": false,\n  "posts": [\n    {\n      "integration": {\n        "id": "{{ $('go').item.json.ig }}"\n      },\n      "value": [\n        {\n          "content": {{ $('Merge1').item.json.text }},\n              "image":[\n                {\n                  "id": "{{ $('Merge1').item.json.id }}",\n                  "path": "{{ $('Merge1').item.json.path }}"\n               }\n          ]\n        }\n      ],\n      "settings": {\n        "post_type": "post"\n      }\n    }\n  ]\n}\n",
        "options": {
          "allowUnauthorizedCerts": true
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -2224,
        -880
      ],
      "id": "affa5605-b3cc-44da-9188-f052d9068552",
      "name": "Instagram Publisher",
      "credentials": {
        "postizApi": {
          "id": "---",
          "name": "Postiz account"
        }
      }
    }
  ],
  "connections": {
    "Instagram Publisher": {
      "main": [
        []
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "---"
  }
}

👍 Expected behavior

The Ending should just stay mp4 and not change.

👎 Actual Behavior with Screenshots

Image

💻 Operating system

Linux

🤖 Node Version

latest

📃 Provide any additional context for the Bug.

to crosscheck, I uploaded from n8n to a test site, ending is mp4
I also uploaded to R2 directly, ending is mp4
When I upload in Postiz frontend, ending is mp4

So it's just the API

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions