Skip to content

[BUG] S3 Directory Loader fails when prefix is a directory (e.g. docs or docs/) – EISDIR error #4688

Description

@rquintanab

Describe the bug
When configuring an S3 Directory Loader, Flowise refuses prefixes that end with a trailing slash (e.g. docs/). It only accepts prefixes like docs/1, and then processes only the objects whose keys start with that extra character. Attempting to use a bare folder prefix results in an error:

Failed to preview chunks: Error: documentStoreServices.previewChunksMiddleware - Error: documentStoreServices.previewChunks - Error: documentStoreServices.splitIntoChunks - Failed to load data from bucket my-bucket: Failed to download file docs/ from S3 bucket my-bucket: EISDIR: illegal operation on a directory, open '/tmp/s3fileloader-DlNmPf/docs/'

To Reproduce
Steps to reproduce the behavior:

Go to Data Sources → New Loader → S3 Directory Loader.
Enter any valid bucket name
Set your prefix (docs/ in my case)
Click Preview
See the error above.

Expected behavior
Flowise should traverse the entire folder (docs/) and process every object inside it, without requiring an additional character after the trailing slash.

Setup

  • Installation: docker
  • Flowise Version: 3.0.1
  • OS: Windows 11
  • Browser: Google Chrome

Additional context
Flowise should traverse the entire folder (docs/) and process every object inside it, without requiring an additional character after the trailing slash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions