Upload videos in background

As the app is designed right now it only upload videos in the foreground. IMHO this is bad because it means you have to open the app every time you want to upload videos. For people that aren’t interested in technical stuff (most of my users and clients and especially iOS users) they just want it to work, and NOT open the app every time they want to upload videos.

So, I’m proposing to change the behaviour to upload videos in background as well as photos. Or at least make it optional. It shouldn’t be up to the app developer to decide, it should be up to the user to decide.

The ownCloud IOS app does it, so why shouldn’t the Nextcloud app do it as well?

Also, another thing I’m missing is to see the current uploads just like in the Android app. Right now you can’t be sure that the photo was actually uploaded. Does it retry by default?

Thanks!

Hi @enoch85 Nextcloud iOS send all file (video/photo no difference) only in background (Foreground only for Upload All Camera Videos/Fotos for memory/space question ) ! why do you say that it does not, and see current upload too … i do not understand … current downloads/uploads see directly in folder or in Control Center … have you used the App iOS ?

Thanks

Hi @ios

Nextcloud iOS send all file (video/photo no difference) only in background

Thanks for your promt reply. I just migrated from ownCloud to Nextcloud and my wife has an iPhone 6 with latest iOS (10 I think) and in the menu it clearly says: “Due to the use of CPU, the videos will be sent only when Nextcloud is active and in the foreground”. Now you say it isn’t that way?

There are so many options in this app (without explaining) that I think you would need some proper Documentation.

Upload ALL images and videos - what’s the difference between instant upload and upload ALL?
Upload Background images, which images does that refer to?
Copy Photo Video in the photo album? So the app copies already taken photos by instant upload and uploads them again?

for memory/space question

On the iPhone or on Nextcloud?

I noticed that you can see the current upload in the Photos folder, but it isn’t obvious where to look. Still, I think that this app should try to look the same as the Android app, or at least try to as much as possible, so that Netcloud users get a similar experience no matter which app they use. That’s how ownCloud did it. This is a great example of how a uploads section could (should) look like IMHO. :slight_smile:

I’m getting confused here as you may notice. Please explain all the options in the uploads settings view. Thanks for your support!

Also, it seems like everytime I close the app the upload stops with error message “no internet connection”. Happened everytime.

I also just tried to close all apps, and took a picture. No uploading of the photo took place before I opened the Nextloud app. Now you say every upload happens in the background, I don’t understand?

Edit: Even with the App in the background (going to home screen and then the camera app and take a photo) the photo/video isn’t uploaded

Server:
Nextcloud 10.0.1
Ubuntu Server 16.04
Apache 2.4
MySQL 5.7
PHP 7.0.8

Client
Nextcloud 2.13
iOS 10.0.2
.

Hi @ios

Nextcloud iOS send all file (video/photo no difference) only in background

Thanks for your promt reply. I just migrated from ownCloud to Nextcloud and my wife has an iPhone 6 with latest iOS (10 I think) and in the menu [it clearly says]Preformatted text(https://cloud.techandme.se/index.php/s/e6EVQj045GHicKv): “Due to the use of CPU, the videos will be sent only when Nextcloud is active and in the foreground”. Now you say it isn’t that way?

Oh! Yes @enoch85, excuse me , i was thinking for the normal add image or video, but you mean for automatic upload … ok, yes, in iOS do not exists a true background but only a bit system for this possibility, now when the app it’s activate from iOS event from “significant geographical variations” the app have only 30 sec. for take new photos / videos with low use of CPU (he he he) then if take a big video in this moment the iOS ended (crash) my app … for this reason the video upload in background are dangerous … ok ?

There are so many options in this app (without explaining) that I think you would need some proper Documentation.

ya ! tue true true … toooo small time for this :tired_face:

Upload ALL images and videos - what’s the difference between instant upload and upload ALL?
Upload Background images, which images does that refer to?
Copy Photo Video in the photo album? So the app copies already taken photos by instant upload and uploads them again?

ALL = All the foto or and Video in your iPhone, if you have 5000 photo the app send 5000 photo on cloud. only Foreground for memory problem

INSTANT = from now and in future in automatic detect mode (“significant geographical variations”) in background

Copy Photo Video in the photo album = create only a album in App Photo iOS with name Nextcloud, test it.

for memory/space question

On the iPhone or on Nextcloud?

iPhone, in background mode all the file “must be” saved on sandbox App for transfer them at the NSULRSystem iOS for background, if you have 5000, 6000 photo this is a big problem !, in foreground no problem, i have the total control and i take one photo or video at a time for NSULRSystem iOS in foreground mode, then remove from sandbox the photo or video etc.

I noticed that you can see the current upload in the Photos folder, but it isn’t obvious where to look. Still, I think that this app should try to look the same as the Android app, or at least try to as much as possible, so that Netcloud users get a similar experience no matter which app they use. That’s how ownCloud did it. This is a great example of how a uploads section could (should) look like IMHO. :slight_smile:

Have you look the Control Panel ?


And for Android … yes and no, i don’t like Android solution or ownCloud iOS solution for transfer queue, the normal user iOS expects an operation conforms to standard Apple :slight_smile:
For the future i hope more collaboration from Nextcloud Android, iOS … and Nextcloud core API … in this moment no direction or giude-line and is complicated … more complicated …

I’m getting confused here as you may notice. Please explain all the options in the uploads settings view. Thanks for your support!

Thanks you

“significant geographical variations” … remember, iOS do not have a background system for App … it is complicated to explain but … have you present the normal interrupt of mp ? a similar thing, but with messages … ios is a extraordinary system, but with big limitations for app …

bye

Well, this is no good…

Please take a look at this soulution to get some inspiration: https://github.com/owncloud/ios/pull/681 and https://github.com/owncloud/ios/pull/702

The iOS app uploads both photos and videos without waiting for a significant change in location. It uploads it instantly. The Nextcloud app should be able to do the same. If you want help, please ask in the community. It would be awesome if you could create a repository under Nextcloud to attract more people of helping you with the code and implement stuff like this.

Sorry, but to me this app is no good until it can make uploads completely in the background, videos too. You should not have to open the app for the videos or photos to be uploaded. :thumbsdown:

@enoch85 The dear friends ownCloud IOS use, as dropbox, the location manager :

Please take a look at this soulution to get some inspiration: https://github.com/owncloud/ios/pull/6811 and https://github.com/owncloud/ios/pull/702

from InstantUpload.m owncloud (Latest commit d33a8d6 on 30 Aug) :

-(void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status {
if ([self backgroundInstantUploadEnabled]) {
if (status == kCLAuthorizationStatusAuthorizedAlways) {
[self.locationManager startMonitoringSignificantLocationChanges];
} else {
[self setBackgroundInstantUploadEnabled:NO];
[self showAlertViewWithTitle:NSLocalizedString(@“location_not_enabled”, nil) body:NSLocalizedString(@“message_location_not_enabled”, nil)];
[self.delegate backgroundInstantUploadPermissionLostOrDenied];
}
}
}

Please read :


https://blog.newrelic.com/2016/01/13/ios9-background-execution/

In iOS exist only a background fetch for wake App iOS but discreetly ios … the Location Manager is’t only a trick, for example dropbox use only foreground and I think they do well.

Please, @enoch85, only comment on constructive talks, this is the email for your gripes :

Tim Cook’s email : tcook@apple.com

Note : soon you will be able to participate in the development of Nextcloud iOS, the whole community is expected of you to risovere this thing.

Thanks

1 Like

Ok, thanks for the clarification. I stand corrected. :slight_smile: And sorry if I came out as rude, it was not my intention. I’m just a bit disappointed that the Nextcloud app behaves worse (if you ask me) than the current ownCloud app. I would expect an improvement as you guys have been developing the Crypto Cloud app for quite some time now.

Still, they have an “Background Upload” option that triggers the upload even if the app isn’t in the foreground or even activated aka suspended.

You said that the videos couldn’t be uploaded if it was to big as the app crashes. Just to confirm I can say that I never experienced a crash with the ownCloud app, it just retries if it failed, and when on Wifi for example it’s much faster. Also, they upload in chunks so the file gets divided into smaller pieces. Does this app do that as well? Even if the app would crash it wouldn’t matter as with ownClouds solution they upload in the background even if the app is is not in the background or foreground, or activated at all.

Please make this a priority! Thanks :smile:

Also, I think the transfer queue should be more obvious. There is no way you can find it now if you don’t know exactly where to look.

OK so here is a good picture taken from Apple Developers site that shows what I’m talking about, just to sort out what we are talking about here:

https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Art/high_level_flow_2x.png

Yeah, really nice blog post about it. As I understands it, what I’m asking can be done with the “NSURLSession”. Even if the app is force closed in multitasking view it will continue the upload in the background.

@ios Just to be sure I re-installed the ownCloud app and took a photo here at home and didn’t move the phone after I took that photo. Some minutes later, the photo was uploaded to Nextcloud without a change in location, same thing with videos. This was done even if the app wasn’t in the foreground, and force closed in multitask view - exactly how I (and many with me) want it to work.

The apps main purpose for me is to upload photos and videos, I don’t use it to browse files, so it’s crucial to me that this function is perfect.

No no no, (some minute later) possible, the app remain if memory even for 5 minute or more before entered in background mode ( i don’t use this time for check new photo, i don’t interested), then (with phone do not move) the fetch system can wake up to for 30 sec. , ok for look if exists new photo and send it.

please read the the object-c code

Video : if you have small Video no problem but with big Video the ios close the APP !!!
I Have also the encryption mode and in in background mode it’s dangerous.

If you feel comfortable with owncloud continues to use it, nobody forbids you.

@ios

i don’t use this time for check new photo, i don’t interested

Why?

with phone do not move) the fetch system can wake up to for 30 sec. , ok for look if exists new photo and send it.

I don’t understand this, please evolve.

If you feel comfortable with owncloud continues to use it

What? :open_mouth: A better answer would be “I (you) will look into what I can do to address this issue”. I’m sorry to say that right now it feels like using the ownCloud app is the best option here… :confused:

As the Nextcloud VM developer I’m always trying to improve stuff, and come up with solutions, and the fact is - this app doesn’t behave in the same way as the ownCloud app does. This is my first time use experience, and instead of recommending me to change back to app ownCloud app, maybe you should look into how to actually solve this? Sorry again if I sound harsh, it’s not my intention.

if you have small Video no problem but with big Video the ios close the APP !!!
I Have also the encryption mode and in in background mode it’s dangerous.

Ok, so the app has encryption by default, right? You can’t turn off the password as it’s used by the keychain. Correct me of I’m wrong.

Another fact: This app isn’t developed to be used with Nextcloud or ownCloud from start, it’s created to secure your files on your phone when using a service like Nextcloud/ownCloud/Dropbox/oneDrive and so on, right?

What I’m trying to say is; Nextcloud has built in Encryption that encrypts the file on the server, so there is no need to encrypt them in the phone as well. As the encryption in the app seems to limit the options and usability I vote for that the encryption in the app should be dropped as it’s already exist in Nextcloud. In that way users could upload videos in the background, right? Well, in that case, problem solved! :slight_smile:

Build the app around Nextcloud users instead of building it on your old idea, as the user base has changed, and so has the possibilities. Sure, if you use Dropbox the old way is good, but right now with Nextcloud I really don’t see the need for an extra layer of encryption. And if you really think it’s necessary, then make it optional and not by default as it limits so many aspects (as it seems from your comment) when uploading in the background.

Also, if the upload takes place in chunks (10 MB each for example) the chunks could be saved in cache so if the app crashes it would still continue when the app starts again. Just an idea, I don’t know how it works in code really, but somehow ownCloud iOS manages to do this even with big files.

With today’s very fast internet speeds over 4G (LTE) and soon to come 5G (here in Sweden) with GigaBit speeds on mobile phones, I don’t see the issue with uploading videos at all. If you’re not comfortable with adding video uploads becuase the 3G/4G are slow, then add a switch to only upload photos in the background over WIFI and/or automatically detect when WIFI is turned on and then upload in the background (without having to open the app), but please, let the user decide and don’t say “I’m not interested”.

Thanks for your support!

Just tried the same things I’ve tried with 2.13 in the new 2.14 version. No change, it still doesn’t work.
I was thinking that this may be a bug with the app and iOS 10, and it said that there were bug fixes with iOS 10…

This thread needs to de-escalate a little before someone gets upset.

Is it just you @ios developing the iOS app?

Hi @JasonBayton, no no, no problem !

This topic is very interesting but is very difficult explain the iOS functioning :astonished:

We’ll be clearer at the next meet-up.

For more information :
https://developer.apple.com/develop/

Thanks

@JasonBayton Yeah, it’s all good. Just that text seems more harsh than talking IRL.

@ios Sorry can’t attend to the meetup, but please have my thoughts in mind. Thanks!

1 Like

UPDATE

With 2.15 the app is still not uploading photos or videos in the background, not even with a change in location.

Sorry, but still using the ownCloud client until this is fixed.

@ios FYI --^