Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for users to manually push images/PDF files to the cloud from the project folder panel #5542

Merged
merged 2 commits into from
Aug 10, 2024

Conversation

nirvn
Copy link
Member

@nirvn nirvn commented Aug 10, 2024

This PR adds a mechanism - through the project folder panel - which allows users to push images and PDFs contained within a cloud project folder (or one of its subfolders) to the QFieldCloud server.

The action is available through a raster image's 3-dot menu within the project folder panel:
image

It is enabled only for raster files to prevent the world from colliding if we were to push back geopackages to the cloud, messing up with delta handling et al.

Practically speaking, this allows: a/ users to recover images that never made it into the server automatically (it shouldn't happen, but as Jurassic Park told us, life finds a way), and b/ users to send back printed layouts and atlases back onto the server.

@qfield-fairy
Copy link
Collaborator

qfield-fairy commented Aug 10, 2024

@m-kuhn
Copy link
Member

m-kuhn commented Aug 10, 2024

@meyerlor
As author of https://ideas.qfield.org/qfieldcloud-feature-requests/p/better-pdf-handling-make-sync-deletion-possible I think you will like this

@nirvn nirvn merged commit c13870a into master Aug 10, 2024
22 of 23 checks passed
@nirvn nirvn deleted the push_to_cloud branch August 10, 2024 10:47
@qfield-fairy
Copy link
Collaborator

The backport to release-3_3 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply db116a090... Allow for users to manually push images/PDF files to the cloud from the project folder panel
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging src/core/utils/qfieldcloudutils.h
Auto-merging src/qml/QFieldLocalDataPickerScreen.qml
CONFLICT (content): Merge conflict in src/qml/QFieldLocalDataPickerScreen.qml

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-3_3 release-3_3
# Navigate to the new working tree
cd .worktrees/backport-release-3_3
# Create a new branch
git switch --create backport-5542-to-release-3_3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick db116a090a2209d0ffac79cd5c76f6e98e36de1a,e7a09c9e5449b50b3618e76c96741338415d11d2
# Push it to GitHub
git push --set-upstream origin backport-5542-to-release-3_3
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_3

Then, create a pull request where the base branch is release-3_3 and the compare/head branch is backport-5542-to-release-3_3.

nirvn added a commit that referenced this pull request Aug 10, 2024
…he project folder panel (#5542)

* Allow for users to manually push images/PDF files to the cloud from the project folder panel

* Add a toaster message to avoid feedback-less UX
nirvn added a commit that referenced this pull request Aug 10, 2024
…he project folder panel (#5542)

* Allow for users to manually push images/PDF files to the cloud from the project folder panel

* Add a toaster message to avoid feedback-less UX
@meyerlor
Copy link

@m-kuhn wow, great stuff! Thanks for your awesome work again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants