Open nicolas-raoul opened 12 months ago
Tried replicating this by changing screen orientation to landscape from portrait at the caption step, it showed correctly for me then after upload is finished in custom picker. Anything I am missing here?
@srishti-R Do you mean it shows with the Commons logo icon at the bottom of the thumbnail? If not sure would you mind posting a screenshot and precise which pic you uploaded with rotation? Thanks! :-)
@nicolas-raoul Here's the screen capture. https://github.com/commons-app/apps-android-commons/assets/53987325/614ac2a8-aaaa-4c64-a0f9-1afd04a822b9
oh did this mean rotating the image as in when editing the image and not the screen orientation?
Sorry yes, you have to tap Edit image
then Rotate
then Save
, I will edit the description to make it unambiguous. Thanks! :-)
@nicolas-raoul I tried to attempt this by making LLJTran write the rotated bitmap to the source file instead of creating a separate file. Even when it does, the SHA of the image that is fetched from commons server tells the custom selector that the unrotated image is not the one that was uploaded. Is SHA stored on server dependent on bitmap or the file that was uploaded? If its bitmap, cant do much, since the bitmap was changed and not the file.
We have a local table containing SHA1 of uploaded files, which we use as a cache. For this issue, it would be enough to just add the SHA1 of both unmodified and modified files to that local cache table.
This cache unfortunately disappears when reinstalling the app, but the solution proposed here is a lower-hanging fruit than the solution proposed at #5295, and probably good enough for most users.
Could you point me to the file where the local cache of SHA1s is present? All I could find out was the code that is checking if the image exists on server using APIs.
You mean we don't call UploadedDao.insertUploaded
to modify uploaded_table
after uploading?
can you assign this issue to me, i think it is related to #5363 issue i just fixed
@mshdabiola Did you get a chance to check my feedback on your pull request at https://github.com/commons-app/apps-android-commons/pull/5569#pullrequestreview-1893148253 ? Thanks a lot! :-)
@mshdabiola I unassign for now, but if you are you still working on this, please let us know. If no answer, someone else may be assigned to it. Thanks a lot. :-)
Steps:
Edit image
thenRotate
thenSave
).Ideally the app would insert the "already uploaded" info into the local database.