Skip to content

Commit

Permalink
Support file upload
Browse files Browse the repository at this point in the history
This allows an sftp client to upload data to the Permanent virtual
filesystem.  Unfortunately the way sftp works there is no way of knowing
how large a file is going to be until after the handle is closed, and
unfortunately permanent requires us to know how large the file is before
it will allow us to generate a presigned post.

This means our solution is to write the file into temporary storage.
This is a potential vulnerability and should be seen as a short term
solution.

Other limitations of this implementation include:

1. Lack of support for editing files
2. Lack of support for updating modtime

All of these will need to be improved in future developments.

Issue #48 Implement file open / write handlers
  • Loading branch information
slifty committed Feb 22, 2023
1 parent 5c65ace commit b5f1c16
Show file tree
Hide file tree
Showing 4 changed files with 380 additions and 77 deletions.
103 changes: 57 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"@babel/preset-typescript": "^7.16.7",
"@tsconfig/node16": "^1.0.2",
"@types/node-fetch": "^2.6.2",
"@types/ssh2": "^1.11.4",
"@types/ssh2": "^1.11.7",
"@types/tmp": "^0.2.3",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.9.0",
"@typescript-eslint/parser": "^5.9.0",
Expand All @@ -60,6 +61,7 @@
"logform": "^2.3.2",
"node-fetch": "^2.6.7",
"ssh2": "^1.11.0",
"tmp": "^0.2.1",
"uuid": "^8.3.2",
"winston": "^3.4.0"
}
Expand Down
Loading

0 comments on commit b5f1c16

Please sign in to comment.