Skip to contents

Create a file upload control that can be used to upload one or more files.

Usage

tag_custom_file_upload(
  inputId,
  multiple = FALSE,
  accept = NULL,
  buttonLabel = "Browse...",
  placeholder = "No file selected",
  ...
)

Arguments

inputId

The input slot that will be used to access the value.

multiple

Whether the user should be allowed to select and upload multiple files at once. Does not work on older browsers, including Internet Explorer 9 and earlier.

accept

A character vector of "unique file type specifiers" which gives the browser a hint as to the type of file the server expects. Many browsers use this prevent the user from selecting an invalid file.

A unique file type specifier can be:

  • A case insensitive extension like .csv or .rds.

  • A valid MIME type, like text/plain or application/pdf

  • One of audio/*, video/*, or image/* meaning any audio, video, or image type, respectively.

buttonLabel

The label used on the button. Can be text or an HTML tag object.

placeholder

The text to show before a file has been uploaded.

...

Arguments passed on to shiny::fileInput

label

Display label for the control, or NULL for no label.

width

The width of the input, e.g. '400px', or '100%'; see validateCssUnit().

capture

What source to use for capturing image, audio or video data. This attribute facilitates user access to a device's media capture mechanism, such as a camera, or microphone, from within a file upload control.

A value of user indicates that the user-facing camera and/or microphone should be used. A value of environment specifies that the outward-facing camera and/or microphone should be used.

By default on most phones, this will accept still photos or video. For still photos only, also use accept="image/*". For video only, use accept="video/*".

Value

A UI element for file upload, similar to `shiny::fileInput`.

Details

This is modified from `shiny::fileInput` to make the format more consistent with the VOX Analysis user-interface.