If you have multiple accounts, the instant upload causes a taken photo to get uploaded to whichever account was active at the time. It’s not clear that this is the case, and we should probably specify it in some way.
(I’m pretty sure I opened an issue about it but can’t find it anymore.) cc @rperezb @davivel @tobiasKaminsky
Info by @lefherz
In https://central.owncloud.org/t/android-instant-upload-with-multiple-accounts-select-target-account/7427 a user reports that in a multi-account setup they can not select the account to which photos shall be instantly uploaded.
The photos are currently only going to the last account which was used. This means that they end up in the wrong folder sometimes. In nextcloud it seems to show the same behavior: https://github.com/nextcloud/android/issues/440
Users should be able to select to which account they want to upload, either after taking a photo or in general.
Can this problem be reproduced with the official owncloud server?
(url: https://demo.owncloud.org, user: test, password: test)
Android version: Android 7.1
Device model: Samsung Galaxy S3 Mini (i8190)
Stock or customized system: Lineage OS 14.1
ownCloud app version: 2.7.0
ownCloud server version: one of them 10.0.7, the other 10.0.6
One solution would be to just add the account to the path.
And allow switching the account when choosing the path.
Or another would be:
All settings are account specific.
If you switch, all settings will be remembered.
Then there could be one account with instant upload and one without it.
And only one instant upload can be active in the same time.
@jancborchardt @tobiasKaminsky I think good solution would be global settings where I can choose the account for instant upload and account specific settings where I can define the path for instant upload.
Right … when there is more than one account there should be a dropdown in the instant upload section like: »Account to upload to«:
[email protected] (default)[email protected]The reason the first account instead of the active account should be the default since that’s the big source of confusion in the current approach. What do you think @tobiasKaminsky @AndyScherzinger @Kernald @Stoyicker @davivel @floriangosse?
(Btw @floriangosse just saw you’re in Berlin – you coming to https://owncloud.org/conf ?)
I have a hard time trying to imagine the settings layout one change at a time. I'd prefer to have a global review taking into account what settings make sense per account, what settings makes sense once for all the app and how distribute both categories in the settings layout.
Choosing the account would be fine for me.
But maybe this should be a list select to support instant upload to multiple accounts?
Would very much love the "Account to upload to" feature as described by @jancborchardt.
@davivel is there an issue or another place your suggested "global review" of settings is discussed?
I'd say yet another option in the "Instant Upload" section should be avoided as it is already very crouded. Instead we could just use the "Upload Path" section. For example like this:

This way, the account which is active at the time the user chooses the upload path is stored. The changes are marginal. I'll create a PR.
This is a really good and clean solution.
But it is not intuitive how to switch to another account.
One would have to change the account and change the folder (even if it is the same name of the folder)?
But I guess this is not happening that often... ;)
Yes, you first have to select the account (which throws you to the file view), then you have to open the settings view again and set the upload path. Not very comfortable, but as you say, it only has to be done once.
This is fine for me.
I hope the regular user is understanding this or can figure it out for themselves ;)
@jancborchardt fine for you?
Why you don't add account specific settings? Would be much easier and so the user could also add instant upload to both accounts or just activate image upload for account 1 and video upload for account 2...
@Ninos Instant upload per account would introduce much bigger changes and make things very complicated. And personally, I see no use case why you would need to upload photos twice to different servers. About your second example, that is possible.
After you have an own configuration page for each account features would get much easier to implement I think. Therefore I recommend to do this step, but you're the bosses :D
From the technical view you are absolutely correct. That would be the best solution. However, considering the current code, it would require many changes. Also the GUI would need re-design. This would require very much attention from the core team, but there are more important things to do at the moment. So I kept the changes of this PR on purpose as small as possible.
Ok :)
We'll have to move our focus to fix instant uploads for the coming of Android N, mainly in #6. Maybe it's a good chance to finally address this also.
I'm removing the tag because there are contributions already :)
Am I wrong or is @LukeOwncloud 's solutuion no more possible to insert?!
Don't get my account into the Upload Path, which would be a perfectly fine solution for me!
Now I share the InstantUpload from wished account to the other account, which is no ideal solution...
Talking from memory, I could be wrong: last time we tested it just shows the current account in the selector, but when the current account is changed also changes the instant upload path to the now-current account. So, not a fix.
Work in progress in https://github.com/owncloud/android/tree/instant_upload_set_account
I've just changed the pipeline of this issue to blocked because, in spite of the instant uploads are already working properly when the user selects as upload account a different account from the active one, we have to discuss some topics related to the upload path selection and the options order in instant uploads preferences view, because it's currently a bit confusing. May @jesmrec has something else to say.
The option in the instant_upload_set_account branch is optimal functionally, but i find a bit annoying that the user selects the account there, and the folder to upload to is placed higher up in the view. Maybe better that the selection of the account and the Upload Path would be placed closer one each other, so the user chooses first the account and immediately the folder.
Other option: setting the default account for videos and pics separately at the same time that the option is enabled.
Steps:
The "Upload path" would work in the same way as right now.
In any case, would be interesting a re-design of the options from an UX point of view (out of scope)
@davigonz @davivel @rperezb
Sorry, but we need to drop issues from milestone 2.4.0 to get it out next to OC 10 server.
This time we'll move topics to backlog instead of directly to next release, so that we can schedule 2.5.0 properly.
Some considerations by @jesmrec to take in account and discuss before implementing.
Most helpful comment
Work in progress in https://github.com/owncloud/android/tree/instant_upload_set_account