mirror of
https://github.com/bitwarden/server.git
synced 2025-05-28 23:04:50 -05:00

* PM-18939 refactoring send service to 'cqrs' * PM-18939 fixing import issue with sendValidationService * PM-18939 fixing code based on PR comments * PM-18339 reverting to previous code in test * PM-18939 adding XMLdocs to services * PM-18939 reverting send validation methods * PM-18939 updating code to match main * PM-18939 reverting validateUserCanSaveAsync to match main * PM-18939 fill our param and return sections of XMLdocs * PM-18939 updating XMLdocs based on PR comments * Update src/Core/Tools/SendFeatures/Commands/Interfaces/IAnonymousSendCommand.cs Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com> * Update src/Core/Tools/SendFeatures/Commands/Interfaces/INonAnonymousSendCommand.cs Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com> * Update src/Core/Tools/SendFeatures/Commands/Interfaces/INonAnonymousSendCommand.cs Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com> * Update src/Core/Tools/SendFeatures/Services/Interfaces/ISendStorageService.cs Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com> * PM-18939 adding commits to change tuple to enum type * PM-18939 resetting stream position to 0 when uploading file * PM-18939 updating XMLdocs based on PR comments * PM-18939 updating XMLdocs * PM-18939 removing circular dependency * PM-18939 fixing based on comments * PM-18939 updating method name and documentation --------- Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
27 lines
1.0 KiB
C#
27 lines
1.0 KiB
C#
using Bit.Core.Tools.Entities;
|
|
|
|
namespace Bit.Core.Tools.SendFeatures;
|
|
|
|
/// <summary>
|
|
/// SendFileSettingHelper is a static class that provides constants and helper methods (if needed) for managing file
|
|
/// settings.
|
|
/// </summary>
|
|
public static class SendFileSettingHelper
|
|
{
|
|
/// <summary>
|
|
/// The leeway for the file size. This is the calculated 1 megabyte of cushion when doing comparisons of file sizes
|
|
/// within the system.
|
|
/// </summary>
|
|
public const long FILE_SIZE_LEEWAY = 1024L * 1024L; // 1MB
|
|
/// <summary>
|
|
/// The maximum file size for a file uploaded in a <see cref="Send" />. Units are calculated in bytes but
|
|
/// represent 501 megabytes. 1 megabyte is added for cushion to account for file size.
|
|
/// </summary>
|
|
public const long MAX_FILE_SIZE = Constants.FileSize501mb;
|
|
|
|
/// <summary>
|
|
/// String of the expected file size and to be used when needing to communicate the file size to the client/user.
|
|
/// </summary>
|
|
public const string MAX_FILE_SIZE_READABLE = "500 MB";
|
|
}
|