Closed mr337 closed 7 years ago
It's on my TODO list, but it is not that easy. Videos are commonly bigger than pictures, therefore need fancy upload with resume handling, both on client and server sides.
@stephanepechard: do you have aready any pointers on how to implement it? Do you need any help on this topic?
I too would like to pitch in, but don't really know where to start as I think you already have something in mind. I was thinking of doing something simple as split file into X byte chunks and notify the server how many pieces and start shipping them over etc.
If you have an overview of what you would like to see I'd def be interested.
@psychedelys @mr337 Thanks for your help. Here are my thoughts on the topic.
Obviously, you need several requests to get it done. I don't know HTTP enough to be sure if such multi-requests file sending is handled gracefully by the protocol but I don't think so. Maybe we can add a specific header to help us in the process, but nothing more probably. Of course, we'll need the state of the uploaded file, but we can stick with the answer of each received chunks.
As @mr337 proposed, the simplest would probably be to split the file in chunks. I was first thinking of sending the file in a whole at first, with the server writing simultaneously, then letting the request die, then resume it starting where the file stopped... But I don't think it would be the smartest idea after all :-1:
What we need now is to modify both clients and servers to handle this. I already know how to detect a new video taken on Android, so that part is covered. As I see it, the task would be, in order:
What do you think about this? Did I forget anything? What part(s) would you take in charge?
I forgot to mentioned that the writer of the new Go server implementation made some very interesting improvements over my humble Python one. You can read them at: https://github.com/PhotoBackup/server-go
It would probably be better to add some of them before hacking such a functionality. Again, tell me what you think about it.
@stephanepechard have you thought any more about how you would want to implement this? I would definitely be willing to pitch in.
I was thinking about something like POST
to a url to get a resource URL with the full file size, then PUT
all the different slices of the file to that URL until the full file is uploaded. The drawback of this is it will greatly increase the complexity of the server implementations.
Thoughts?
I have been kicking around some ideas, but would anyone be opposed to just shooting the entire video up for now to get video uploading working. Then start bringing smarter features like resume, chunking, etc.
@mr337 That sounds like a good idea. What is the old adage, something like perfect is the enemy of good (enough).
@lsowen HA! agree with that, I've also heard it called "perfect paralyzation "
I also would like a video upload. Right now I am using another App, AutoShare for this (This app also doesn't upload video automatically, but at least I can upload any media from the gallery as Intent). So far, I didn't have to many problems with video sizes. Most videos are 10..100mb and failures are very rare.
I agree with @mr337, "stupid" upload would be suffice for the beginning?
Done in version 0.11 in the "stupid" version (no chunks for the moment). Will work on that next!
Checking out the project and looking for something to upload videos and pictures as I take them. Any reason video backup isn't supported? I consider my videos as important as my photos :)