diff --git a/src/main.rs b/src/main.rs index d1c4ed9..334d9e5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,7 @@ async fn main() { // build our application with a route let app = Router::new() .route("/", get(basic)) - .route("/u", post(upload)) + .route("/", post(upload)) .route("/f/:hash", get(get_file)); // run our app with hyper diff --git a/src/vistas/root.rs b/src/vistas/root.rs index d5112a9..9731009 100644 --- a/src/vistas/root.rs +++ b/src/vistas/root.rs @@ -8,9 +8,9 @@ SH4R.IN ======= HTTP POST files here: -curl -F'file=@yourfile.png' https://sh4r.in/u +curl -F'file=@yourfile.png' https://sh4r.in You can also POST remote URLs: -curl -F'url=http://example.com/image.jpg' https://sh4r.in/u +curl -F'url=http://example.com/image.jpg' https://sh4r.in File URLs are valid for aproximately 5 days. @@ -34,7 +34,7 @@ and the originating IP address blocked from further uploads. UPLOAD DIRECTLY --------------- -
+
diff --git a/src/vistas/upload.rs b/src/vistas/upload.rs index ed18f97..cd1196d 100644 --- a/src/vistas/upload.rs +++ b/src/vistas/upload.rs @@ -30,7 +30,7 @@ pub async fn upload(mut multipart: Multipart) -> Response { let mut file = File::create(dest).await.expect("error creando arquivo"); file.write_all(&data).await.expect("error gardando contido"); - link = format!("http://localhost:3000/f/{}", fillo); + link = format!("https://sh4r.in/f/{}", fillo); } link.into_response()