Skip to content

Conversation

phil1995
Copy link
Collaborator

@phil1995 phil1995 commented May 9, 2022

Allows the user to restart uploads that have the status "waiting..." or "failed" via customized FileProvider actions in the Files app by long pressing on the file to open the context menu and selecting "Retry Upload".

The upload will be retried directly in case of failed uploads in this case. For files with the status "waiting..." an alert is presented to the user, which shows him, the current upload progress. If there is no upload progress, the user will also be informed. In both cases the user has the possibility to decide if the upload is stuck and if an upload should be tried again.

To enable the customized FileProvider actions, the NSFileProviderItemIdentifier had to be changed so that the corresponding NSFileProviderDomainIdentifier can be derived from them. Because the domainIdentifier provided in the FileProviderExtensionUI over the extensionContext is not guaranteed the correct NSFileProviderDomainIdentifier from which the action was started. However, it is important for the XPC call to have the correct NSFileProviderDomainIdentifier (otherwise, in the worst case, the upload would be retried for a different file in a different vault).

In addition, failed uploads are now correctly displayed again with an upload error in the Files app - the CloudProviderErrors are mapped to an appropriate NSFileProviderError.

phil1995 added 2 commits May 9, 2022 11:20
…leProviderItemIdentifier`

This is necessary because the `extensionContext.domainIdentifier` in the FileProviderExtensionUI is not guaranteed to be the `domainIdentifier` of the currently visible `NSFileProviderDomain` and thus a correct XPC connection could not be established.
@phil1995 phil1995 requested a review from tobihagemann May 9, 2022 13:51
@tobihagemann tobihagemann added this to the 2.2.5 milestone May 9, 2022
Copy link
Member

@tobihagemann tobihagemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I found a regression: Our good old feature "open vault in Files app" doesn't work anymore.

@phil1995
Copy link
Collaborator Author

I think I found a regression: Our good old feature "open vault in Files app" doesn't work anymore.

Good catch! Regression fixed by 1126699.

@tobihagemann tobihagemann merged commit 60b4832 into develop May 12, 2022
@tobihagemann tobihagemann deleted the feature/recoverable-uploads branch May 12, 2022 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants