Table of Contents

Class DiscordFileUploadComponent

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

A component wherethrough users can upload files. Only used in modals. The maximum cumulative size of the files depends on the server's boost level and nitro.

public sealed class DiscordFileUploadComponent : DiscordComponent
Inheritance
DiscordFileUploadComponent
Inherited Members

Constructors

DiscordFileUploadComponent(string, int?, int?, bool, IReadOnlyList<string>?)

Properties

FileTypes

The file types permissible to upload using this component. This takes any dot-prefixed extensions, or one of the following values:

  • "image": png, gif, jpg, jpeg, jfif, webp, avif,
  • "video": mp4, mov, qt, webm,
  • "audio": mp3, m4a, wav, ogg, opus, flac

    Note that the above lists are not set in stone and should not be hardcoded.
IsRequired

Indicates whether a submission is required. This is mutually exclusive with setting MinValues to 0.

MaxValues

The maximum of files to upload, between 1 and 10.

MinValues

The minimum amount of files to upload, between 0 and 10.