Upload image,get link

How do I get the image link after uploading the image。 The image save path may be outside the main program directory。

    func addProfilePictureHandler(for req: Request) async throws -> String  {

        let data = try req.content.decode(ImageUploadData.self)
        let requestUser = try req.auth.require(User.self)
        
        guard let user = try await User.find(requestUser.id, on: req.db) else {
            throw Abort(.notFound)
        }
        
        let userID: UUID
        do {
            userID = try user.requireID()
        } catch {
            throw try await req.eventLoop.future(error: error).get()
        }
        
        let imageName = "\(userID)-\(UUID()).jpg"

        // It can be a path outside the main program
        let path = req.application.directory.workingDirectory + imageFolder + imageName

        try await req.fileio.writeFile(.init(data: data.picture), at: path)
        user.profilePicture = imageName
        try await user.save(on: req.db)
        
        // return .ok
       // return image url  like  http://localhost:8080/xxx/xxx.jpg
    }

return http://localhost:8080/images/name.jpg
and add another route

    usersRoute.get("images",":name", use: getImageHandler)

    func getImageHandler(for req: Request) async throws -> Response {
        guard let imageName = req.parameters.get("name") else {
            throw Abort(.custom(code: 1000, reasonPhrase: "error image name"))
        }
        
        let path = req.application.directory.workingDirectory + imageFolder + imageName
        return req.fileio.streamFile(at: path)
    }

Thank you for the code. It will really help me in future to build a news website.