Server code to save uploaded files
I think that you're using comments unnecessarily. If you set a variable called fileNumber, the comment // get file number doesn't tell the reader anything new and only clutters the code.



// directory check
let pathExists() = Directory.Exists(serverDirPath)

// create directory
let createDir() = 
    if not (pathExists()) then
        Directory.CreateDirectory(serverDirPath) |&gt; ignore
createDir()


I don't see any reason to have createDir or pathExists as separate functions, since they're short and not reusable.

And as Daniel mentioned in a comment, the check is not actually necessary. So, I would simplify this code to just:

Directory.CreateDirectory(serverDirPath) |&gt; ignore




// check if row exist
let rowCount = 
    query{
        for row in db.Uploads do
        select row
        count
    }

// get file number
let fileNumber = 
    if rowCount &lt; 1
        then
            1
        else
            query{
                for row in db.Uploads do
                select (row.FileNumber + 1)
                head
            }


You can use headOrDefault here, to get rid of the first query:

// get file number
let fileNumber = 
    query {
        for row in db.Uploads do
        select row.FileNumber
        headOrDefault
    } + 1


Also, you're not using any ordering in the query, are you sure the largest FileNumber is always going to be the first one?



let finalServPath = 
    serverDirPath + @"\" + fileNumber.ToString() + extension


You can use Path.Combine() to concatenate parts of a path:

let finalServPath = 
    Path.Combine(serverDirPath, fileNumber.ToString() + extension)