spreed
spreed copied to clipboard
Improving user experience of uploading files
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Is your feature request related to a problem? Please describe.
Improving user experience of uploading files (renaming, overwriting, not uploading (same checksum)) when there are files on the server ("/talk" subdir) with the same name.
Expressed on https://github.com/nextcloud/talk-android/issues/2280
Detail: https://github.com/nextcloud/talk-android/issues/2280#issuecomment-1265918095
Describe the solution you'd like
Actually, the solution chosen to this issue is in nextcloud-talk android app is: (not really sure if it's the same for spreed)
1.- File is automatically renamed to prevent conflict
This solution is quick... but it duplicate (triplicates, etc...) the files at server if you want to send it (quickly) to different conversations, and not entering to nextcloud client app (files) each time to share between X conversations ).
IMHO, the preferred way will be (by order):
3.- Checksum files, if files are identical, (add)share the link to his conversation directly (*).
If not identical, ask the user if he wants:
- upload_overwrite the file at server and (add)share the link to the conversation,
or
- upload the file renamed and (add)share the link to the conversation.
(*) I think, It could have side effects not allowing to "upload_renamed" if identical... could be "upload_renamed" is necessary for some situations...
2.- User is asked if he wants to overwrite, rename or share link to existing file <--- If the above protocol (3.) it's too much work for coding it :-).
Original idea expressed on https://github.com/nextcloud/talk-android/issues/2280
Detail: https://github.com/nextcloud/talk-android/issues/2280#issuecomment-1265918095
Describe alternatives you've considered
Detail: https://github.com/nextcloud/talk-android/issues/2280#issuecomment-1265918095
Additional context
It was initially issued for nextcloud-talk android app, but I've been redirected to ask it here for matching protocols.
Original idea expressed on from @dontinelli.
- Checksum files, if files are identical, (add)share the link to their conversation directly () () I think, It could have side effects not allowing to "upload_renamed" if identical... could be "upload_renamed" is necessary for some situations...
Exactly that is the case at least in our company. Sometimes you share a document with different people/groups and ask for the feedback and the feedback should not be mixed with the feedback of a second group, so defaulting to resharing is not a good idea at least for non-images and having different flows depending on the type will be even less good for users.
You can achieve this already by uploading it only once and then in the second chat using the "Share from Nextcloud" option. If it is too difficult to achieve it there, maybe we need to improve the "Share from Nextcloud" option to show the recent file(s) on top or something.
cc @jancborchardt @nimishavijay for Design feedback
- Checksum files, if files are identical, (add)share the link to their conversation directly () () I think, It could have side effects not allowing to "upload_renamed" if identical... could be "upload_renamed" is necessary for some situations...
Exactly that is the case at least in our company. Sometimes you share a document with different people/groups and ask for the feedback and the feedback should not be mixed with the feedback of a second group, so defaulting to resharing is not a good idea at least for non-images and having different flows depending on the type will be even less good for users.
For the situation you describe, thinking on a future feedback, you could think to ask the uploader user to select between (bold) options:
1. OVERWRITE (because_different_checksum): (only show this option to the user if "original_filename" and "sender_filename" have "different checksum". "original_filename" must not be locked or in use by other process on the server) (If the server have correct versioning and certified uploads, the below protocol... could be shorter )
1.1- Lock the "original_filename" at the server
1.2- Upload de "sender_filename" with a "unique_temporal_filename" to the server
1.3- When the "sender_filename" is correctly uploaded like "unique_temporal_filename" to the server, add "original_filename shares" and "the new user/group conversation shares" to the "unique_temporal_filename".
1.4 Unlock "original_filename" and delete it.
1.5 Rename "unique_temporal_filename" to "original_filename".
2. UPLOAD_RENAMED: (show this option to the user ALWAYS, being indifferent if "original_filename" and "sender_filename" have the same checksum, but it's important informing the result of checksum's match to the user)
2.1 Offer to the user to upload the "sender_filename" default_named to "sender_filename_(room_code)_(index).extension", but allowing the user to change this default name (this could be your case @nickvergessen )
2.2 Add the required shares of the conversation where it's send.
3.NO_UPLOAD (add-sharing or resharing) (only show this option to the user if "original_filename" and "sender_filename" have "same checksum")
3.1 Add the required shares of the conversation to the "original_filename" at the server.
So, for uploading a file, when there is another file at the server with the same name, could be only a set of 2 options:
Option 1 (different checksum): 2 Buttons: "OVERWRITE" and "UPLOAD_RENAMED" Option 2 (same checksum): 2 Buttons: "NO_UPLOAD (resharing)" and "UPLOAD_RENAMED"
You can achieve this already by uploading it only once and then in the second chat using the "Share from Nextcloud" option.
I know about "Share from Nextcloud"... but the solution described at first block, it's less time cost-effective for the user on Talk (spreed) compared to "Share from Nextcloud", but at the "nextcloud-talk android app" it's a lot of lower time cost-effective, because resharing there is not possible for now.
Well.... I don't know, it's a proposal.
If it is too difficult to achieve it there, maybe we need to improve the "Share from Nextcloud" option to show the recent file(s) on top or something.
Could be another valid option, but I think it's slower too.
(Another thing to have a mind for.... it's if we always want, or could really do, a checksum of the files... It has cost.)
is this feature implemented? am facing issues daily while resharing the files ? is there any workaround to auto rename file if it is already exits in talk folder?
There will not be overwriting/replacing of files, to not cause unintended situations when a file with the same name is reshared into another conversation.
However there is also no plan at the moment to "deduplicate" shared files. We might want to make it simpler in the future by allowing to "forward" a file message into another conversation. But we are not there yet.
am not asking about replacing or overwriting or dedicate the files.
consider i have sent an file in the name of a.pdf to user xxx. i want share the slightly modified version of a.pdf to user yyy. if sent the new file to second user he is not getting the new file until i rename the new file in talk folder.
am simply asking if we try to upload the file with same name why cant we rename it something like a(1).pdf a(2).pdf by default. this will solve all the problems.
when it comes to chat mostly file will be dragged and dropped in chat window not every file is shared from nextcloud folders.
easiest way to solve this is add upload time stamp at end of the file name in every local upload there will no duplicates in talk folder.
am simply asking if we try to upload the file with same name why cant we rename it something like a(1).pdf a(2).pdf by default. this will solve all the problems.
This is exactly what is happening
it is not happening for me thats why am commented on this thread. every time it is creating conflict in file name, i must rename it in talk folder to use the file. am using latest versions of talk and nextcloud only.
error for your reference
I found a bug guys
if extension is in uppercase server considers it as two different files, when it sync to local windows file extension are not case sensitive thats why am getting conflict.
I found a bug guys
That's currently expected and not a bug. Windows handles things a bit differently, see https://github.com/nextcloud/server/issues/44963 for an improvement on this.
If the same file should be shared in multiple chats, that can be achieved nicely and fully non-duplicated via:
- Sharing the internal link (or share link) from Files
- Or with the smart picker (
/
command) which now is even easier to discover
Otherwise @nickvergessen’s comment from https://github.com/nextcloud/spreed/issues/8157#issuecomment-1277025060 holds that it would be a privacy issue to unintentionally reshare the same file with different parties if it is not intended.