Repository: kestra-io/kestra
Issue: File preview doesn't show data for some subflow's FILE inputs 
Labels: bug

### Expected Behavior

Reproducer

1. Subflow:

```yaml
id: file
namespace: dev

inputs:
  - name: file
    type: FILE

tasks:
  - id: file
    type: io.kestra.plugin.scripts.shell.Commands
    runner: PROCESS
    commands:
      - cat {{ inputs.file }}
```


2. Parent flow:
```yaml
id: eachItemRows
namespace: dev

tasks:
  - id: extract
    type: io.kestra.plugin.fs.http.Download
    uri: https://raw.githubusercontent.com/kestra-io/datasets/main/csv/orders.csv

  - id: split
    type: io.kestra.core.tasks.storages.Split
    from: "{{ outputs.extract.uri }}"
    rows: 1 # also try running this with 2 
  
  - id: each
    type: io.kestra.core.tasks.flows.EachParallel
    value: "{{ outputs.split.uris }}"
    tasks:
      - id: subflow
        type: io.kestra.core.tasks.flows.Flow
        namespace: dev
        flowId: file
        inputs:
          file: "{{ taskrun.value }}"
        wait: true
        transmitFailed: true
```

I believe the issue might be caused by CSV file headers

https://share.descript.com/view/nH4woU2zNMv


### Environment Information

- Kestra Version: 0.12.0



Issue comments:
same when using input from JDBC query passed to the same subflow 

```yaml
id: each_item_rows
namespace: dev

tasks:
  - id: extract
    type: io.kestra.plugin.jdbc.duckdb.Query
    sql: |
      INSTALL httpfs;
      LOAD httpfs;
      SELECT *
      FROM read_csv_auto('https://raw.githubusercontent.com/kestra-io/datasets/main/csv/orders.csv', header=True);
    store: true

  - id: split
    type: io.kestra.core.tasks.storages.Split
    from: "{{ outputs.extract.uri }}"
    rows: 1
  
  - id: each
    type: io.kestra.core.tasks.flows.EachParallel
    value: "{{ outputs.split.uris }}"
    tasks:
      - id: subflow
        type: io.kestra.core.tasks.flows.Flow
        namespace: dev
        flowId: file
        inputs:
          file: "{{ taskrun.value }}"
        wait: true
        transmitFailed: true
```

Pull request review comments:

Patch that resolved the issue:
diff --git a/webserver/src/main/java/io/kestra/webserver/controllers/ExecutionController.java b/webserver/src/main/java/io/kestra/webserver/controllers/ExecutionController.java
index 2a91c58c42..c592e753b2 100644
--- a/webserver/src/main/java/io/kestra/webserver/controllers/ExecutionController.java
+++ b/webserver/src/main/java/io/kestra/webserver/controllers/ExecutionController.java
@@ -967,10 +967,7 @@ public HttpResponse<?> filePreview(
         @Parameter(description = "The execution id") @PathVariable String executionId,
         @Parameter(description = "The internal storage uri") @QueryValue URI path
     ) throws IOException {
-        HttpResponse<StreamedFile> httpResponse = this.validateFile(executionId, path, "/api/v1/executions/{executionId}/file?path=" + path);
-        if (httpResponse != null) {
-            return httpResponse;
-        }
+        this.validateFile(executionId, path, "/api/v1/executions/{executionId}/file?path=" + path);
 
         String extension = FilenameUtils.getExtension(path.toString());
         InputStream fileStream = storageInterface.get(path);


Test patch: