[PR #1334] [MERGED] Send azure upload #2840

Closed
opened 2025-11-26 23:24:49 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1334
Author: @MGibson1
Created: 3/22/2021
Status: Merged
Merged: 3/29/2021
Merged by: @MGibson1

Base: masterHead: send-azure-upload


📝 Commits (8)

  • 8fb00c3 Add direct upload api endpoints
  • 1871f87 Create azure upload service
  • 22de832 Update max file size
  • e13df9f Update send file upload test
  • 1240be2 Move internationalization string to correct document
  • ca5935f Allow for one shot blob uploads
  • 1532194 Remove unused helper
  • 3453c7e Use FileUploadService

📊 Changes

16 files changed (+393 additions, -33 deletions)

View changed files

📝 src/App/Pages/Send/SendAddEditPage.xaml (+2 -2)
📝 src/App/Pages/Send/SendAddEditPageViewModel.cs (+1 -1)
📝 src/App/Resources/AppResources.resx (+3 -0)
📝 src/Core/Abstractions/IApiService.cs (+4 -0)
src/Core/Abstractions/IAzureFileUpoadService.cs (+10 -0)
src/Core/Abstractions/IFileUploadService.cs (+9 -0)
src/Core/Enums/FileUploadType.cs (+9 -0)
src/Core/Models/Response/SendFileUploadDataResponse.cs (+12 -0)
📝 src/Core/Services/ApiService.cs (+10 -0)
src/Core/Services/AzureFileUploadService.cs (+196 -0)
src/Core/Services/BitwardenFileUploadService.cs (+26 -0)
src/Core/Services/FileUploadService.cs (+51 -0)
📝 src/Core/Services/SendService.cs (+33 -8)
📝 src/Core/Utilities/CoreHelpers.cs (+1 -1)
📝 src/Core/Utilities/ServiceContainer.cs (+3 -2)
📝 test/Core.Test/Services/SendServiceTests.cs (+23 -19)

📄 Description

Overview

Implement Azure direct uploads in Mobile client. Commensurate PR to bitwarden/jslib#296

Files Changed

  • SendAddEditPage/SendAddEditPageViewModel/AppResources.resx: Update Send max data limit to 500MB.
  • ApiService: Add new direct upload endpoints for Send
    • PostFileTypeSendAsync: Request creation of a file type send. Response is the send created as well as information on how to upload the file associated with the Send.
    • PostSendFileAsync: The new way to post Send file data to Bitwarden. Data is passed as the sole component of a multipart form
    • RenewFileUploadUrlAsync: Upload urls expire. This endpoint allows us to request an extension to continue uploading to Azure, if necessary.
  • AzureStorageService: New service that handles uploading files to azure. Takes in an Azure blob endpoint url, parses it to determine how to upload data, and uploads the data in the preferred manner for the given file size.
  • FileUploadType: Enum defining the way to upload a file. Current options are Direct (which uses the Bitwarden API) and Azure (which uses AzureStorageService)
  • SendFileUploadDataResponse: Model containing information on how to upload file data and the SendResponse created from the File Send creation request.
  • SendService: Honor the file upload type requested by new file send creation endpoint.
  • CoreHelpers: GetUri is used in AzureStorageService, where the URI object is used to help parse out parameter information
  • ServiceContainer: Include AzureStorageService dependency in SendService instantiation
  • SendServiceTests: Update File Send Creation to include new Azure upload.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/1334 **Author:** [@MGibson1](https://github.com/MGibson1) **Created:** 3/22/2021 **Status:** ✅ Merged **Merged:** 3/29/2021 **Merged by:** [@MGibson1](https://github.com/MGibson1) **Base:** `master` ← **Head:** `send-azure-upload` --- ### 📝 Commits (8) - [`8fb00c3`](https://github.com/bitwarden/android/commit/8fb00c328f8d463a92c6f0c5f45e4fd92e83ec5a) Add direct upload api endpoints - [`1871f87`](https://github.com/bitwarden/android/commit/1871f87950a100248c0a37c547540ffbc1d0ccd5) Create azure upload service - [`22de832`](https://github.com/bitwarden/android/commit/22de832cf234f7ca5dc7957e2f409f04f970c895) Update max file size - [`e13df9f`](https://github.com/bitwarden/android/commit/e13df9f672afdf06d3934e51961b3deb9461c68e) Update send file upload test - [`1240be2`](https://github.com/bitwarden/android/commit/1240be2c68f256959997bcd08f7036eadfe9c9da) Move internationalization string to correct document - [`ca5935f`](https://github.com/bitwarden/android/commit/ca5935ff043ec7efee8c6c3aa39684616b22e482) Allow for one shot blob uploads - [`1532194`](https://github.com/bitwarden/android/commit/1532194c3d0d7323de6641007e42c89d8bc8fdb1) Remove unused helper - [`3453c7e`](https://github.com/bitwarden/android/commit/3453c7e6e2197a089fca0a23b1cfcd8cef93c22a) Use FileUploadService ### 📊 Changes **16 files changed** (+393 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Send/SendAddEditPage.xaml` (+2 -2) 📝 `src/App/Pages/Send/SendAddEditPageViewModel.cs` (+1 -1) 📝 `src/App/Resources/AppResources.resx` (+3 -0) 📝 `src/Core/Abstractions/IApiService.cs` (+4 -0) ➕ `src/Core/Abstractions/IAzureFileUpoadService.cs` (+10 -0) ➕ `src/Core/Abstractions/IFileUploadService.cs` (+9 -0) ➕ `src/Core/Enums/FileUploadType.cs` (+9 -0) ➕ `src/Core/Models/Response/SendFileUploadDataResponse.cs` (+12 -0) 📝 `src/Core/Services/ApiService.cs` (+10 -0) ➕ `src/Core/Services/AzureFileUploadService.cs` (+196 -0) ➕ `src/Core/Services/BitwardenFileUploadService.cs` (+26 -0) ➕ `src/Core/Services/FileUploadService.cs` (+51 -0) 📝 `src/Core/Services/SendService.cs` (+33 -8) 📝 `src/Core/Utilities/CoreHelpers.cs` (+1 -1) 📝 `src/Core/Utilities/ServiceContainer.cs` (+3 -2) 📝 `test/Core.Test/Services/SendServiceTests.cs` (+23 -19) </details> ### 📄 Description # Overview Implement Azure direct uploads in Mobile client. Commensurate PR to bitwarden/jslib#296 # Files Changed * **SendAddEditPage/SendAddEditPageViewModel/AppResources.resx**: Update Send max data limit to 500MB. * **ApiService**: Add new direct upload endpoints for Send * PostFileTypeSendAsync: Request creation of a file type send. Response is the send created as well as information on how to upload the file associated with the Send. * PostSendFileAsync: The new way to post Send file data to Bitwarden. Data is passed as the sole component of a multipart form * RenewFileUploadUrlAsync: Upload urls expire. This endpoint allows us to request an extension to continue uploading to Azure, if necessary. * **AzureStorageService**: New service that handles uploading files to azure. Takes in an Azure blob endpoint url, parses it to determine how to upload data, and uploads the data in the preferred manner for the given file size. * **FileUploadType**: Enum defining the way to upload a file. Current options are `Direct` (which uses the Bitwarden API) and `Azure` (which uses AzureStorageService) * **SendFileUploadDataResponse**: Model containing information on how to upload file data and the SendResponse created from the File Send creation request. * **SendService**: Honor the file upload type requested by new file send creation endpoint. * **CoreHelpers**: GetUri is used in AzureStorageService, where the URI object is used to help parse out parameter information * **ServiceContainer**: Include AzureStorageService dependency in SendService instantiation * **SendServiceTests**: Update File Send Creation to include new Azure upload. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:24:49 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#2840