1

We have a document-sharing app where 2 user types can upload documents (like Dropbox).

There are two user roles:

  1. User role A: Has access to all documents in the folder and can tag some documents as "hidden" from User B
  2. User role B: Has access to all documents that are not hidden by User type A. (It is not always understood by User role B that some documents will be hidden from them)

If User B tries to upload a file that has exactly same name as a file that he doesn't have rights to, what should happen?

Please note that the software we are using does not allow two files to have the same name. Here are the options I see:

  1. User is given an error "Sorry you cannot upload a file with that name" - this would be confusing the the user because they can't see any reason why not!

  2. User is allowed to upload the file but the file name is automatically given a "(1)" at the end of the name - this would be confusing to User type B

2

Dodge the issue

For example OS X prefixes hidden files with a . period.

This may not be applicable for your use, since you expect Role A to see all documents, but you can do something similar by not using the file name as the internal identifier, even if it is used as the display name.

So now you potentially have two files called file.txt with different internal unique identifiers. For User B that's easy, you just show the one they can see. For user A you simply show the two files with a clear visual identifier to show which is the "normal" file everyone can see, and which is the "hidden" or privileged file.

My suggestion would be to give the filename a different background colour, or add a [Hidden] tag to the file.

Think of it as the equivalent of having two users called Paul Smith - it doesn't matter what they're called, because you'll give them a different ID internally. Then you'd differentiate them visually with a profile picture or avatar etc.

-1

Dropbox gives you a Syncing error when you upload a document with the same name, restricted to you to view/interact with.

I'm glad you asked the question since it's important to solve this problem since Cloud storage is an emerging trend.

Personally, in contrast to @JonStory's solution: I feel like dodging the issue might simply cause multiple copies of the same file if say 10 users were to create a file with the same name.

The correct solution would be to notify the owner of the original document, say Mr. X saying that a contradictory file has been uploaded to the cloud by Mr. Y.

A conflicting copy of "FILE_NAME" has been uploaded to FOLDER_NAME.

Rename FILE_NAME or Disallow?

Mr. Y would get a notification saying that the file is in the queue of being uploaded but requires confirmation from another user since it's causing a redundancy in the storage.

FILE_NAME is queued for upload. A conflict has been observed and requires authorization. Please wait for confirmation.

Mr. X will notice the notification and will be able to rename his old file, or will request Mr. Y to rename his new file.

As soon as the new or old file is renamed, the new file will be instantly uploaded to the cloud.

If Mr. X renames old file,

The conflict has been resolved and FILE_NAME has been successfully uploaded to FOLDER_NAME.

else,

FILE_NAME creates a redundancy in the storage. Rename FILE_NAME to continue upload.

This maintains a privacy and doesn't tell the user as to who has restricted his access, provides a fair reason to rename and for queuing the upload and also prevents duplicate copies.

  • 1
    This is certainly a solution: I was working from the assumption that the user wanted the fact that there are hidden files to be "invisible" to users who have Role B, but not Role A (ie that it may be acceptable to have two similarly named files). Your solution is certainly the "normal" method, but loses that invisibility. – Jon Story Oct 12 '15 at 14:41
  • I respect your answer, however I do not see it as a scalable solution, since for a cloud storage with say 1000 employees, if everyone were to upload Resume.pdf, it would become too many files with the same name and that even with the invisibility, as an Administrator who can view all the files, it would be very difficult for me to comprehend why are there copies of the same document and at the same time would even look unorganized. – Swapnil Borkar Oct 12 '15 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.