Skip to content

Is multipart file upload supported? #174

Description

@KDederichs

Heya,

maybe I'm just too stupid but:
Can you use the Kernel Browser to submit files to api endpoints that accept multipart/form submissions?

I know with the API Platform test browser you can do it like this:

        $file = new UploadedFile(__DIR__ . '/../../Fixtures/test.xml, 'test.xml');

        $response = $client->request('POST', '/bar', [
            'headers' => ['Content-Type' => 'multipart/form-data'],
            'extra' => [
                'parameters' => [
                    'foo' => 'baz',
                ],
                'files' => [
                    'file' => $file,
                ],
            ],
        ]);

But I have yet to figure out how to do this with THIS browser. Sadly the documentation doesn't really contain anything related to this (the only file related stuff seems to be symfony form related?)

So I was wondering if you can indeed upload files using this and if so how?
Or in case you can't I guess this is a feature request :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions