-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Enable azure direct upload #1167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+431
−112
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
566ed1c
Direct upload to azure
MGibson1 b87866f
Decode send Id from accessId
MGibson1 dc93065
Quick respond to no-body event calls
MGibson1 8af6a46
Event Grid only POSTS to webhook
MGibson1 41217c7
Enable local storage direct file upload
MGibson1 93963f2
Increase file size difference leeway
MGibson1 4861006
Upload through service
MGibson1 197755c
Fix LocalFileSendStorage
MGibson1 e3aee91
Update src/Api/Utilities/ApiHelpers.cs
MGibson1 4b186b3
Do not delete directory if it has files
MGibson1 8aa423f
Allow large uploads for self hosted instances
MGibson1 135d1e2
Fix formatting
MGibson1 aefe17c
Re-verfiy access and increment access count on download of Send File
MGibson1 2fc6450
Merge branch 'master' into enable-azure-direct-upload
MGibson1 995c5a4
Update src/Core/Services/Implementations/SendService.cs
MGibson1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| namespace Bit.Core.Enums | ||
| { | ||
| public enum FileUploadType | ||
| { | ||
| Direct = 0, | ||
| Azure = 1, | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/Core/Models/Api/Response/SendFileUploadDataResponseModel.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| using Bit.Core.Enums; | ||
|
|
||
| namespace Bit.Core.Models.Api.Response | ||
| { | ||
| public class SendFileUploadDataResponseModel : ResponseModel | ||
| { | ||
| public string Url { get; set; } | ||
| public FileUploadType FileUploadType { get; set; } | ||
| public SendResponseModel SendResponse { get; set; } | ||
|
|
||
| public SendFileUploadDataResponseModel() : base("send-fileUpload") { } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also missing a check here as to whether the Send is enabled or has exceeded it's access count. Although not sure if the access count parameter gets another check here since it would have already been incremented by 1 before downloading the file (assuming).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sizable changes to fix this, but I think I hit the points we discussed. there's still a bit of a data leak in that you learn the name and size of the file without incrementing AccessCount, but for now that seems a small issue