Skip to main content

DEV_STORAGE_PATH

Constant DEV_STORAGE_PATH 

Source
pub const DEV_STORAGE_PATH: &str = "/ocre/dev/storage";
Expand description

Path of the development route serving presigned URLs from the local bucket: /ocre/dev/storage/<key>.

In debug builds (ocre dev, ocre test), presign_get, presign_put, presign_part, direct_upload and serve_redirect answer URLs on this route of the app (APP_URL, else http://localhost:8787) instead of R2’s, and serve mounts it: GET (with Range), PUT and PUT ?partNumber=&uploadId= work on the local bucket as on R2, so development never touches the real bucket and needs no R2_* setting. Release builds have no such route. The URLs are not signed: the route exists only on a developer’s machine.

§Examples

assert_eq!(ocre::storage::DEV_STORAGE_PATH, "/ocre/dev/storage");