Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ object FileRoutes {
)
}

case req @ POST -> Root / "upload" / "init" as user =>
case req @ POST -> Root / "upload" as user =>
addUserIdToReq(req.req, user.id).flatMap { req =>
routeRequestJson(
req,
s"http://localhost:$file_service_port/file/upload/init",
s"http://localhost:$file_service_port/file/upload",
Method.POST
)
}
Expand Down
4 changes: 0 additions & 4 deletions file_service/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,10 @@ def gather_stat(file_path: str):

stat = os.stat(file_path)

created_at = datetime.datetime.fromtimestamp(stat.st_ctime).strftime("%Y-%m-%d")
modified_at = datetime.datetime.fromtimestamp(stat.st_mtime).strftime("%Y-%m-%d")
return {
"file_name": os.path.basename(file_path),
"size_bytes": stat.st_size,
"mime_type": mime_type,
"created_at": created_at,
"modified_at": modified_at,
}


Expand Down