Restricts rename/delete for empty attachment. This is because rename/delete on an 0 sized attachment will result in error when applyEdits() is called.
Blocks download and rename of large attachments of > 50 MB. This is because renaming an attachment will load the attachment into memory which we are trying to avoid
Summary of changes:
The context menu is hidden for any attachments whose size is 0.
FormAttachmentState.maxAttachmentSize specifies the max allowed attachment size that can be loaded. This is 50 MB currently.
Added two exception types that can be used to send error information to the UI from the FormAttachmentState.
AttachmentSizeLimitExceededException - indicates attachment size exceeds the maximum limit.
EmptyAttachmentException - indicates attachment size is 0.
AttachmentTile can now collect on the FormAttachmentState.loadStatus to listen to failures and display a toast accordingly.
Rename is disabled in the context menu for attachments greater than the specified limit in FormAttachmentState.maxAttachmentSize
Related to issue: #apollo/775, #apollo/768
Description:
Restricts rename/delete for empty attachment. This is because rename/delete on an 0 sized attachment will result in error when
applyEdits()
is called. Blocks download and rename of large attachments of > 50 MB. This is because renaming an attachment will load the attachment into memory which we are trying to avoidSummary of changes:
FormAttachmentState.maxAttachmentSize
specifies the max allowed attachment size that can be loaded. This is 50 MB currently.FormAttachmentState
.AttachmentSizeLimitExceededException
- indicates attachment size exceeds the maximum limit.EmptyAttachmentException
- indicates attachment size is 0.AttachmentTile
can now collect on theFormAttachmentState.loadStatus
to listen to failures and display a toast accordingly.FormAttachmentState.maxAttachmentSize
Pre-merge Checklist