Skip to content

Fix urgent crashes A and E #1749

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

Merged

Conversation

neslihanturan
Copy link
Collaborator

Description

Fixes A and E from #1545 (I hope). It saves file which is being uploaded to a temp location, and uses Uri of that file as reference during upload process, instead of using Uri that content provider supported.

Tests performed (required)

Tested on API 23, beta debug. Tested actions: share photo from another application, share multiple photos from another application and contributing via contributions list.

Not: Finally a beautiful commit history!

…l save the file to a internal path and it will be deleted by another method after upload process is done.
…e, instead of Contributions.getLocalUri which was Uri from content provider
…om temporarily saved file, insdeat of the Uri from content provider.
… sure if it is useless or not. Requires discussion
…ame file and access old file reference. It was a weird problem though
@codecov-io
Copy link

codecov-io commented Jul 26, 2018

Codecov Report

❗ No coverage uploaded for pull request base (2.8-release@d05cf39). Click here to learn what that means.
The diff coverage is 2.99%.

Impacted file tree graph

@@              Coverage Diff              @@
##             2.8-release   #1749   +/-   ##
=============================================
  Coverage               ?   3.65%           
=============================================
  Files                  ?     186           
  Lines                  ?    9314           
  Branches               ?     823           
=============================================
  Hits                   ?     340           
  Misses                 ?    8951           
  Partials               ?      23
Impacted Files Coverage Δ
.../free/nrw/commons/di/CommonsApplicationModule.java 47.61% <ø> (ø)
...ain/java/fr/free/nrw/commons/upload/FileUtils.java 3.22% <ø> (ø)
...r/free/nrw/commons/contributions/Contribution.java 0% <0%> (ø)
...java/fr/free/nrw/commons/upload/UploadService.java 0% <0%> (ø)
...w/commons/contributions/ContributionsActivity.java 0% <0%> (ø)
...fr/free/nrw/commons/nearby/NearbyListFragment.java 0% <0%> (ø)
...java/fr/free/nrw/commons/upload/ShareActivity.java 0% <0%> (ø)
...r/free/nrw/commons/utils/ExternalStorageUtils.java 0% <0%> (ø)
...rw/commons/mwapi/ApacheHttpClientMediaWikiApi.java 3.76% <0%> (ø)
.../commons/contributions/ContributionController.java 0% <0%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d05cf39...44d4e49. Read the comment docs.

@neslihanturan
Copy link
Collaborator Author

Ready to be tested @misaochan :)

@misaochan
Copy link
Member

Just tested this. All of my tests work and the wrong image bug seems to have been fixed, great job! :) A Nearby upload failed once, but the next upload I tried via the same method succeeded, so that was probably just a fluke.

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.

3 participants