/srv/irclogs.ubuntu.com/2014/03/25/#ubuntuone.txt

tbaratcould anybody help in ubuntuone developer question?08:43
JamesTaitGood morning all! Happy Tuesday, and happy Tolkien Reading Day! :-D09:05
JamesTaittbarat, possibly - best to just ask and if someone can help, they will.09:06
tbaratI would like to find karni, he wrote the code09:07
tbaratbut sadly he is unreachable09:07
tbaratbut my problem is in ubuntuOne api, exactly INFO: Magic upload failure, status code: 400 hung up the execution09:08
tbaratjamesTait09:08
tbaratthanks, JamesTait09:09
* JamesTait has a hazy, distant memory of magic uploads....09:09
JamesTaittbarat, it's been a while since I looked at this, is this when doing an HTTP PUT to /api/v1/~/<something>09:39
tbaratJamesTait, yes exactly this is a put,  in my version I'd like to upload a file, after when I modified it. In my opinion that something confusing09:41
tbaratwith the filewrite(stream) and the upload (stream)09:41
JamesTaittbarat, as an aside, it looks like karni is away due to national holidays and will be back on Thursday.09:45
tbaratJamesTait, Thanks for this information.09:46
mandeltbarat, yes, he is in CET time, if I see him I'll ping him09:47
mandeltbarat, are you the one that posted on reddit? because in that case I can tell him to go straight to the post (easier to connect there than in irc)09:47
tbaratmandel, I am also in CET, not sure what you mean reedit09:48
mandelreddit, sorry09:49
mandeltbarat, => http://www.reddit.com/r/Ubuntu/comments/20k2z8/updated_ubuntu_one_qml_mockup/09:49
tbaratno, I did not write there any comment09:50
tbaratmandel,09:50
mandeltbarat, ok, then someone else is working on a u1 client for the phone :)09:51
tbaratmandel, ubuntuOne is the best choice nowadays for integrate in your own code in my opinion, not surprised that someone else also need assistance09:54
tbaratcurrently I am connecting it with Iaas09:57
mandelreally?09:58
mandelwow, well I think karni is your man for the rest api09:58
tbaratyes I know, 'cause we also consulted a few weeks ago.10:04
tbaratwell, I will reach him after the polish holidays10:05
JamesTaittbarat, another person who might be able to help you, though I don't see him around now, is aquarius.10:07
tbaratJamesTait, maybe the time difference, I am in CET10:08
JamesTaittbarat, AFAIK aquarius is still in the UK (same as me), but I'm not sure what his current situation is. Worth keeping a look out for, though.10:09
JamesTaittbarat, I'm assuming you're working from the docs at https://one.ubuntu.com/developer/files/store_files/cloud10:12
tbaratJamesTait,more than less yes, I am reusing karni's samples or libs10:16
JamesTaittbarat, AIUI, a 400 response there means the content isn't in the cloud, or isn't reusable in the cloud, and you should proceed with a normal file upload (HTTP PUT with the content of the file as the request body, and appropriate Content-Length and Content-Type headers).10:19
JamesTaittbarat, did I understand correctly that you have a file that you've uploaded, and then you modified it locally and want to re-upload it?10:20
tbaratJamesTait, you understand correctly, yes10:20
JamesTaittbarat, so in that instance I don't think the magic upload would work, because the content of the file has changed.  In any event, your code should be prepared to receive a 400 response and revert to a normal (non-magic) upload.10:21
tbaratin Karni's sample put method switching automatically to normal upload10:22
tbaratand that interesting that upload it as well, but the code execution hung up in the error.10:23
tbaratJamesTait,10:23
JamesTaitAh, I'm not familiar with that code, I'm afraid.  I'm strictly server-side. :)10:23
tbarathttp://bazaar.launchpad.net/~ubuntuone-android-hackers/ubuntuone-files-java-library/trunk0.x/view/head:/src/main/com/ubuntuone/api/files/U1FileAPI.java10:24
JamesTaittbarat, I was just about to ask for that! :)10:24
tbaratthat is okay, to finish the upload in real but the execution hang up in this time, and does not return to the main function :D10:26
tbaratwhere I have to call another methods10:26
tbaratJamesTait, Is it possible that confusing the filewriter stream and the html put stream?10:29
tbaratbecause the trouble only stand with those files what I have modified in that  source10:29
tbaratbtw, I closed the file after modification ( bufferedreader/writer(.closed))10:30
JamesTaittbarat, so is it hanging somewhere around l.855 of that file?10:31
tbaratJamesTait, sorry what is l.855?10:31
JamesTaittbarat, http://bazaar.launchpad.net/~ubuntuone-android-hackers/ubuntuone-files-java-library/trunk0.x/view/head:/src/main/com/ubuntuone/api/files/U1FileAPI.java#L85510:32
tbaratJamesTait, oh yes :D exactly in  the 856 line10:32
JamesTaittbarat, IOW, you get the 400 response from the magic upload, log the warning, but it's hanging somewhere between l.855 and l.876?10:34
tbaratJamesTait, I think it hanging in the 873 line, because I realised that the file uploaded in the real10:35
tbaratbut the execution hang up10:36
tbaratand there is one Inputstream as well, possible that this is confused !?10:36
JamesTaittbarat, my best guess would be something to do with the U1OnProgressListener.10:45
JamesTaittbarat, but I am really just guessing at this point - I'm not familiar with the client library, so I'd have to do some digging to make sense of it.10:45
tbaratI am going to switch of the listener in put, and let see what happening10:46
tbaratJamesTait, no the listener seems that works correctly 'cause it returns successful finish, but the execution hang up10:51
JamesTaittbarat, I think at this stage it comes down to inserting log statements at lines 877, 879 and 881 and progressively digging deeper to pinpoint the exact point at which it stops. :-/10:56
=== gatox_ is now known as gatox
tbaratJamesTait, so it is not easy to figure out?12:22
JamesTaittbarat, well, not for me - I'm not familiar with karni's code, so I don't have any useful insights, I'm afraid.13:46
tbaratJamesTait, okay thats also was great help, thanks13:47
=== gatox is now known as gatox_lunch
=== gatox_lunch is now known as gatox
=== jono is now known as Guest59567

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!