pub fn wait_for_upload_ready(
    media_id: &Uuid,
    library: MediaLibrary,
    abort_controller: Option<&AbortController>,
) -> impl Future<Output = bool> {
    init();

    let promise = match abort_controller.as_ref() {
        Some(abort_controller) => waitForUploadReady(
            &media_id.to_string(),
            library.to_str(),
            Some(&*abort_controller),
        ),
        None => waitForUploadReady(&media_id.to_string(), library.to_str(), None),
    };

    async move {
        match JsFuture::from(promise).await {
            Ok(_) => true,
            Err(_) => false,
        }
    }
}
// If an AbortController is provided, then dropping it will cause the JS promise to reject and this
// future will resolve with false
// In all cases, when upload is completed, the Future will resolve with true
If an AbortController is provided, then dropping it will cause the JS promise to reject and this
future will resolve with false
In all cases, when upload is completed, the Future will resolve with true
If an AbortController is provided then dropping it will cause the JS promise to reject and this future will resolve with false In all cases when upload is completed the Future will resolve with true
pub fn wait_for_upload_ready(
    media_id: &Uuid,
    library: MediaLibrary,
    abort_controller: Option<&AbortController>,
) -> impl Future<Output = bool> {
    init();
    let promise = match abort_controller.as_ref() {
        Some(abort_controller) => waitForUploadReady(
            &media_id.to_string(),
            library.to_str(),
            Some(&*abort_controller),
        ),
        None => waitForUploadReady(&media_id.to_string(), library.to_str(), None),
    };
    async move {
        match JsFuture::from(promise).await {
            Ok(_) => true,
            Err(_) => false,
        }
    }
}
pub fn wait_for_upload_ready ( media_id : & Uuid , library : MediaLibrary , abort_controller : Option < & AbortController > , ) -> impl Future < Output = bool > { init ( ) ; let promise = match abort_controller . as_ref ( ) { Some ( abort_controller ) => waitForUploadReady ( & media_id . to_string ( ) , library . to_str ( ) , Some ( & * abort_controller ) , ) , None => waitForUploadReady ( & media_id . to_string ( ) , library . to_str ( ) , None ) , } ; async move { match JsFuture :: from ( promise ) . await { Ok ( _ ) => true , Err ( _ ) => false , } } }
If an AbortController is provided, then dropping it will cause the JS promise to reject and this
future will resolve with false
In all cases, when upload is completed, the Future will resolve with true
If an AbortController is provided then dropping it will cause the JS promise to reject and this future will resolve with false In all cases when upload is completed the Future will resolve with true
media_id
&Uuid
library
MediaLibrary
abort_controller
Option<&AbortController>
media_id
&Uuid
library
MediaLibrary
abort_controller
Option<&AbortController>