Compare commits
No commits in common. "f9974e79a7528940a95b04d45cb01e9670215db9" and "525b5389a1cf4cc2069448d71a2b0f3958346ae5" have entirely different histories.
f9974e79a7
...
525b5389a1
|
@ -7,5 +7,5 @@ mkdir -p dist
|
|||
cp dashboard.desktop dist
|
||||
cp ../target/release/dashboard dist
|
||||
strip dist/dashboard
|
||||
tar -czf dashboard.tgz dist/
|
||||
tar -cf dashboard.tgz dist/
|
||||
|
||||
|
|
|
@ -9,5 +9,5 @@ cp ../target/release/file-service dist
|
|||
cp ../target/release/auth-cli dist
|
||||
strip dist/file-service
|
||||
strip dist/auth-cli
|
||||
tar -czf file-service-${VERSION}.tgz dist/
|
||||
tar -cf file-service-${VERSION}.tar.gz dist/
|
||||
|
||||
|
|
|
@ -1,24 +1,28 @@
|
|||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
use cookie::Cookie;
|
||||
use handlers::{file, handle_auth, handle_upload, thumbnail};
|
||||
use http::status::StatusCode;
|
||||
// use mustache::{compile_path, Template};
|
||||
// use orizentic::{Permissions, ResourceName, Secret};
|
||||
use bytes::Buf;
|
||||
use cookie::Cookie;
|
||||
use futures_util::StreamExt;
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
convert::Infallible,
|
||||
io::Read,
|
||||
net::{IpAddr, Ipv4Addr, SocketAddr},
|
||||
path::PathBuf,
|
||||
sync::Arc,
|
||||
};
|
||||
use tokio::sync::RwLock;
|
||||
use warp::{Filter, Rejection};
|
||||
use warp::{filters::multipart::Part, Filter, Rejection};
|
||||
|
||||
mod handlers;
|
||||
mod html;
|
||||
mod pages;
|
||||
|
||||
const MAX_UPLOAD: u64 = 15 * 1024 * 1024;
|
||||
|
||||
pub use file_service::{
|
||||
AuthDB, AuthError, AuthToken, FileHandle, FileId, FileInfo, ReadFileError, SessionToken, Store,
|
||||
Username, WriteFileError,
|
||||
|
@ -133,7 +137,7 @@ pub async fn main() {
|
|||
.and(warp::post())
|
||||
.and(with_app(app.clone()))
|
||||
.and(with_session())
|
||||
.and(warp::multipart::form().max_length(MAX_UPLOAD))
|
||||
.and(warp::multipart::form())
|
||||
.then(handle_upload);
|
||||
|
||||
let thumbnail = warp::path!(String / "tn")
|
||||
|
|
Loading…
Reference in New Issue