(abort-send this id)
Abort the send with the given ID.
Abort the send with the given ID.
(clear-upload-list-impl state-map id)
Implementation for a mutation that clears the file list on a file upload input by its ID.
Implementation for a mutation that clears the file list on a file upload input by its ID.
(current-files file-upload)
Returns the current set of files that a file upload component is managing.
Returns the current set of files that a file upload component is managing.
(file-upload-ident id)
Given a file upload control's ID, returns the ident for that upload control.
Given a file upload control's ID, returns the ident for that upload control.
(file-upload-input name & {:keys [accept multiple? className]})
Declare (in a form-spec) a field that represents file upload(s).
accept
: (optional) String of comma-separated mime types that the files can have.
multiple?
: (optional) True/false. Can the user upload multiple files? (default false)
Declare (in a form-spec) a field that represents file upload(s). `accept`: (optional) String of comma-separated mime types that the files can have. `multiple?`: (optional) True/false. Can the user upload multiple files? (default false)
(file-upload-networking)
(file-upload-networking upload-url)
Create an instance of a file upload networking object. You should install one of these as the
:file-upload
remote in your fulcro client. Upload url defaults to /file-upload, but can
be configured (here and on the server)
Create an instance of a file upload networking object. You should install one of these as the `:file-upload` remote in your fulcro client. Upload url defaults to /file-upload, but can be configured (here and on the server)
(get-js-file file-props)
Returns a js/File object for the given file input properties. Useful if you want to do some ui-related operations, such as showing a preview of the file.
Returns a js/File object for the given file input properties. Useful if you want to do some ui-related operations, such as showing a preview of the file.
(progress% progress-evt)
Given a XhrIo network progress event, returns a number between 0 and 100 to indicate progress.
Given a XhrIo network progress event, returns a number between 0 and 100 to indicate progress.
Render a file that is to be (or is in the process of being) uploaded.
Render a file that is to be (or is in the process of being) uploaded.
Render a file upload component. Typically declared and embedded in a form. All of these parameters can be passed through f/form-field, which is the normal way to render this control when using forms.
Allowed customization props (through computed):
:accept - The MIME types (comma-separated string) allowed.
:multiple? - If the upload should let the user select multiple files.
:renderFile - A custom (fn [upload-id file-props] DOM)
to render the files that selected for upload.
upload-id
is the ID of the file upload control that owns the file.
See fulcro.ui.file-upload/File's query for details of available file-props. Can invoke
the cancel-file-upload
mutation to cancel an upload (which is why you need the upload-id).
:renderControl - A custom (fn [onChange accept multiple?] DOM)
that will render the DOM for the control that appears to allow
users to add files. Must output at least an input
of type file
with onChange set to the function it
receives. If set, accept
is the acceptable MIME types, and multiple?
is if the control should allow more
than one file to be selected. The upload input UI component will hide the control if it is not multiple and
a file has been selected.
Render a file upload component. Typically declared and embedded in a form. All of these parameters can be passed through f/form-field, which is the normal way to render this control when using forms. Allowed customization props (through computed): :accept - The MIME types (comma-separated string) allowed. :multiple? - If the upload should let the user select multiple files. :renderFile - A custom `(fn [upload-id file-props] DOM)` to render the files that selected for upload. `upload-id` is the ID of the file upload control that owns the file. See fulcro.ui.file-upload/File's query for details of available file-props. Can invoke the `cancel-file-upload` mutation to cancel an upload (which is why you need the upload-id). :renderControl - A custom `(fn [onChange accept multiple?] DOM)` that will render the DOM for the control that appears to allow users to add files. Must output at least an `input` of type `file` with onChange set to the function it receives. If set, `accept` is the acceptable MIME types, and `multiple?` is if the control should allow more than one file to be selected. The upload input UI component will hide the control if it is not multiple and a file has been selected.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close