Skip to content

🐛 Bug Report: TypeError: source.on is not a function at Array.handler #106

Closed
@everurstruly

Description

@everurstruly

👟 Reproduction steps

  1. Set up a Next.js API route (with app router) to handle a POST request.
  2. Ensure the request receives FormData containing an appended image file.
  3. Use the Appwrite Node.js SDK to upload the file.

👍 Expected behavior

Upload the file!

👎 Actual Behavior

When calling storage.createFile in Appwrite Node.js SDK, the upload behaves inconsistently.
Once in a thousand years, the file uploads successfully. Most of the time, it fails with the same error!

The issue occurs without any clear pattern, making debugging frustrating.
Pattern? I've used different file object representations! Blob, Buffer...

🎲 Appwrite version

Version 0.10.x

💻 Operating system

Windows

🧱 Your Environment

Windows Specifications
Edition: Windows 10 Pro
Version: 22H2
System type: 64-bit operating system, x64-based processor

Codebase
Node: v20.13.1
Next.js: v15
Node-Appwrite: v15.0.0

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

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions