Skip to content

Get entity ID for File Upload #1144

Open
@paolodamico

Description

@paolodamico

Hi!

I'm using the FileField and my upload endpoint is something like this:

http://api.example.com/entity/1/

The problem is that I need to provide the URL when I'm defining the field, without knowing the entity's ID, like this:
nga.field('logo', 'file').uploadInformation({ 'url': 'http://api.example.com/entity/ID_HERE/', 'accept': '.svg'})

How can I provide the ID of the current entity to upload the file?

P.S. I only use this field in the editionView, therefore the ID is always available.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions