Sync doc with different name in server but same name in mobile client

I have situation that mobile client need different files but with same filename:

We have two configuration files, name conf_1, conf_2, and they are in different channel conf_1_channel, and conf_2_channel, user 1 is assigned to conf_1_channel and user2 is assigned to conf_2_channel, but after sync, both mobile user 1 and 2 will get file as conf. is there way when conf_1 synced to user1 but filename changed to conf, and user2 get conf_2 as conf also by sync function?

can you please share the sync function and the sample doc?

By “filename”, do you mean documentId? And are you looking to change the document Id during sync - you can’t. Any reason why the files are named differently the first place?

Our app will have different configuration files depends on user’s role. Instead of app to read different configuration based on user role, I am thinking that app will read configuration with only one doc id but this doc id will have different content because it was sync on different channel to different couchbase server doc id.

The min sync unit for sync gateway is the document, you can not sync part of document – sync the whole document or don’t sync the document.