use crate::pages::api::files::{DeleteFile, upload_file}; use leptos::html::{Input, Label}; use leptos::logging::{debug_error, debug_log}; use leptos::prelude::*; use leptos::web_sys::{File, FormData}; use leptos_icons::Icon; use leptos_oidc::AuthSignal; use leptos_use::{UseDropZoneOptions, UseDropZoneReturn, use_drop_zone_with_options}; #[component] pub fn FileDrop( /// The name of this input. Used in file organization. #[prop(into)] name: String, /// The ID of the form containing this input. Used in file organization. #[prop(into)] form_id: String, /// The types that a file is allowed to be. Must be specified as the desired file extension (i.e. /// `.pdf`, `.txt`, etc.) #[prop(optional)] allowed_types: Vec, /// A [`Resource`] that gives the currently uploaded files for this input. #[prop()] existing_files: Resource, ServerFnError>>, ) -> impl IntoView { let zone_ref = NodeRef::