mirror of
https://github.com/bitwarden/server
synced 2025-12-15 15:53:59 +00:00
[PM-28285] Bugfix: Fix attachment uploads on selfhosted instances (#6590)
* [PM-28285] Remove check for LastKnownRevisionDate when uploading attachment file directly. Remove accidental commit files * Remove tests that are no longer relevant * Remove unecessary lastKnownRevisionDate check from attachment share operation
This commit is contained in:
@@ -183,9 +183,8 @@ public class CipherService : ICipherService
|
||||
}
|
||||
}
|
||||
|
||||
public async Task UploadFileForExistingAttachmentAsync(Stream stream, Cipher cipher, CipherAttachment.MetaData attachment, DateTime? lastKnownRevisionDate = null)
|
||||
public async Task UploadFileForExistingAttachmentAsync(Stream stream, Cipher cipher, CipherAttachment.MetaData attachment)
|
||||
{
|
||||
ValidateCipherLastKnownRevisionDate(cipher, lastKnownRevisionDate);
|
||||
if (attachment == null)
|
||||
{
|
||||
throw new BadRequestException("Cipher attachment does not exist");
|
||||
@@ -290,11 +289,10 @@ public class CipherService : ICipherService
|
||||
}
|
||||
|
||||
public async Task CreateAttachmentShareAsync(Cipher cipher, Stream stream, string fileName, string key,
|
||||
long requestLength, string attachmentId, Guid organizationId, DateTime? lastKnownRevisionDate = null)
|
||||
long requestLength, string attachmentId, Guid organizationId)
|
||||
{
|
||||
try
|
||||
{
|
||||
ValidateCipherLastKnownRevisionDate(cipher, lastKnownRevisionDate);
|
||||
if (requestLength < 1)
|
||||
{
|
||||
throw new BadRequestException("No data to attach.");
|
||||
|
||||
Reference in New Issue
Block a user