Create uploads if does not exists
This commit is contained in:
@@ -15,6 +15,4 @@ COPY --from=builder /usr/src/assets/static/404.html /usr/app/assets/static/404.h
|
||||
COPY --from=builder /usr/src/config /usr/app/config
|
||||
COPY --from=builder /usr/src/target/release/gabrielkaszewski_rs-cli /usr/app/gabrielkaszewski_rs-cli
|
||||
|
||||
RUN mkdir -p /usr/app/uploads
|
||||
|
||||
ENTRYPOINT ["/usr/app/gabrielkaszewski_rs-cli", "start"]
|
@@ -60,6 +60,10 @@ impl Hooks for App {
|
||||
}
|
||||
|
||||
async fn after_context(ctx: AppContext) -> Result<AppContext> {
|
||||
// Create uploads directory if it doesn't exist
|
||||
let _ = std::fs::create_dir("uploads");
|
||||
|
||||
|
||||
let store = storage::drivers::local::new_with_prefix("uploads").map_err(Box::from)?;
|
||||
|
||||
Ok(AppContext {
|
||||
|
Reference in New Issue
Block a user