Skip to main content

direct_upload_script

Function direct_upload_script 

Source
pub fn direct_upload_script<S: Clone + Send + Sync + 'static>() -> Router<S>
Expand description

Serves DIRECT_UPLOAD_JS at GET /ocre/direct-upload.js: merge it into the routes, then load it in the layout with <script src="/ocre/direct-upload.js" defer></script>.

ยงExamples

use axum::Router;
use ocre::Ctx;

fn routes() -> Router<Ctx> {
    Router::new().merge(ocre::storage::direct_upload_script())
}