This commit is contained in:
@@ -118,6 +118,7 @@ pub async fn proxy_handler(
|
||||
error!("cannot upload to storj: {}", e);
|
||||
} else {
|
||||
warn!("file {} uploaded to storj", filekey);
|
||||
state.set_path(&filekey, &filekey).await;
|
||||
}
|
||||
let _ = thumbdata_save(filedata.clone(), &state, &filekey, content_type.to_string())
|
||||
.await;
|
||||
@@ -170,6 +171,7 @@ pub async fn proxy_handler(
|
||||
warn!("cannot upload to storj: {}", e);
|
||||
} else {
|
||||
warn!("file {} uploaded to storj", filekey);
|
||||
state.set_path(&filekey, &filepath).await;
|
||||
}
|
||||
Ok(HttpResponse::Ok().content_type(content_type).body(filedata))
|
||||
},
|
||||
|
@@ -72,10 +72,10 @@ pub async fn upload_handler(
|
||||
warn!("cannot upload to storj: {}", e);
|
||||
} else {
|
||||
warn!("file {} uploaded to storj", body);
|
||||
// Сохраняем информацию о загруженном файле для пользователя
|
||||
user_added_file(&mut state.redis.clone(), &user_id, &body).await?;
|
||||
state.set_path(&body, &body).await;
|
||||
}
|
||||
|
||||
// Сохраняем информацию о загруженном файле для пользователя
|
||||
user_added_file(&mut state.redis.clone(), &user_id, &body).await?;
|
||||
}
|
||||
}
|
||||
Ok(HttpResponse::Ok().body(body))
|
||||
|
Reference in New Issue
Block a user