Skip to content

Commit

Permalink
Update documentation to clarify configuration options in relation to …
Browse files Browse the repository at this point in the history
…issue #98
  • Loading branch information
jcohen02 committed Dec 24, 2023
1 parent 2024b2b commit 53701a8
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ On the client side, you need to set the endpoints of the ``process``,
``revert``, ``fetch``, ``load`` and ``restore`` functions to match the
endpoint used in your path statement above. For example if the first
parameter to ``url`` is ``^fp/`` then the endpoint for the ``process``
function will be ``/fp/process/``. For example, your client-side configuration
may include configuration similar to the following::
function will be ``/fp/process/``.

An example client-side configuration might include configuration similar to the
following::

FilePond.setOptions({
...
Expand All @@ -96,11 +98,19 @@ may include configuration similar to the following::
patch: '/patch/',
revert: '/revert/',
fetch: '/fetch/?target=',
load: '/load/'
load: '/load/?id=',
restore: '/restore/?id='
}
...
});

Note that the `load` and `restore` endpoints in django-drf-filepond expect the
upload ID to be provided as an `id` query string parameter, hence the `?id=` at
the end of the query strings shown in the above example. For the `fetch`
endpoint, django-drf-filepond expects the target URL to be specified via a
query string parameter named `target`, again, as per the above sample
configuration.

See the `filepond server configuration <https://pqina.nl/filepond/docs/patterns/api/server/>`_
documentation for further examples.

Expand Down

0 comments on commit 53701a8

Please sign in to comment.