CORS is not working !

Showing 1-15 of 15 messages
CORS is not working ! Mihai 8/14/12 10:27 AM
It there any update on the CORS issue ? It seems that the browser upload API still doesn't allow CORS requests . For some reasons it seems that even the sample demo http://gdata-samples.googlecode.com/svn/trunk/gdata/youtube_upload_cors.html doesn't use CORS at all so the CORS demo doesn't use CORS ?. Instead of that makes a simple POST and redirects to blank page with status=200 to catch the response.
Re: CORS is not working ! Jeffrey Posnick 8/14/12 3:17 PM
Hello Mihai,

 Sorry. We're slowly getting to the point where uploads.gdata.youtube.com supports CORS. There's a decent chance the change will be made on August 22, though I apologize in advance if that happens to slip again.

 The CORS demo shows doing an HTTP POST to gdata.youtube.com (which is CORS-enabled) so that browser-based upload metadata can be submitted entirely in JavaScript, even though the upload takes place via a standard HTTP form submission POST. Believe me, that's much better than what we previously offered (you had to run server-side code to perform a browser based uploads, or use an ugly Flash shim).

Cheers,
-Jeff Posnick, YouTube API Team
YouTube Developer Relations is hiring! developers.google.com/jobs


On Tuesday, August 14, 2012 1:27:58 PM UTC-4, Mihai wrote:
It there any update on the CORS issue ? It seems that the browser upload API still doesn't allow CORS requests . For some reasons it seems that even the sample demo http://gdata-samples.googlecode.com/svn/trunk/gdata/youtube_upload_cors.html doesn't use CORS at all so the CORS demo doesn't use CORS ?. Instead of that makes a simple POST and redirects to blank page with status=200 to catch the response.
Re: [YouTube-API] Re: CORS is not working ! Mihai 8/14/12 3:28 PM
Hi Jeff , Thanks a lot for getting back to me ! The ETA is really helpful.  

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/youtube-api-gdata/-/uFvOt8b_Fu4J.
To post to this group, send email to youtube-...@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gd...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

Re: [YouTube-API] Re: CORS is not working ! Антон Ильиных 8/22/12 11:27 AM
are there any news?
Re: [YouTube-API] Re: CORS is not working ! Jeffrey Posnick 8/22/12 12:29 PM
Yes; I'm now hearing August 28, so this slipped another week. But it's still going to happen.

Cheers,
-Jeff Posnick, YouTube API Team
YouTube Developer Relations is hiring! developers.google.com/jobs


On Wednesday, August 22, 2012 2:27:26 PM UTC-4, Антон Ильиных wrote:
are there any news?
Re: [YouTube-API] Re: CORS is not working ! Mihai 8/28/12 8:47 PM
any update ? it's August 29
Re: [YouTube-API] Re: CORS is not working ! Jeffrey Posnick 8/29/12 1:24 PM
Hello Mihai,

 That's really disappointing. I just tried and OPTIONS requests are still being rejected with a HTTP 405. I'm following up again with the engineer who was working on this to see what went wrong, as I really want to see it make it to production as much as you all.

Cheers,
-Jeff Posnick, YouTube API Team
YouTube Developer Relations is hiring! developers.google.com/jobs


Re: [YouTube-API] Re: CORS is not working ! Jeffrey Posnick 9/5/12 7:39 AM
Hello,

 To update things, the engineering team is still working on a few things that were overlooked during the initial attempts to turn on CORS for uploads.gdata.youtube.com. The latest date I'm hearing from them is Wednesday, Sept. 12.

 Sorry again for all the delays and false starts.

Cheers,
-Jeff Posnick, YouTube API Team
YouTube Developer Relations is hiring! developers.google.com/jobs


Re: [YouTube-API] CORS is not working ! Mihai 9/11/12 3:38 PM
any update ?
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/youtube-api-gdata/-/cwdimcCpDDkJ.

To post to this group, send email to youtube-...@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gd...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

Re: [YouTube-API] Re: CORS is not working ! Mihai 9/11/12 4:08 PM

additionally is it possible to do not redirect the browser after the file is uploaded ? Currently the API seems to require a nexturl parameter that would not make sense anymore in a CORS  enabled environment .
Re: [YouTube-API] Re: CORS is not working ! Mihai 9/14/12 2:46 PM
Hi Jeff  ,
 Is there any new ETA ?

Mihai.


On Wednesday, 5 September 2012 17:39:41 UTC+3, Jeffrey Posnick wrote:
Re: [YouTube-API] Re: CORS is not working ! Jeffrey Posnick 9/17/12 12:44 PM
Hello,

 There is—the engineering team just checked in yet another configuration change, in the hopes that this one does the trick. We're looking at around next Tuesday for when it will be deployed, though.

 I continue to apologize for how long this is taking to get right.

Cheers,
-Jeff Posnick, YouTube API Team
YouTube Developer Relations is hiring! developers.google.com/jobs


Re: [YouTube-API] CORS is not working ! Mihai 9/24/12 8:28 PM
Hi Jeff , 

 Is there any update on CORS ?

All the best,
Mihai
--
Starting October 15, 2012, this group will stop accepting new posts. We recommend that developers start using Stack Overflow and the Issue Tracker for YouTube API support. More details about this change and relevant links can be found at http://apiblog.youtube.com/2012/09/the-youtube-api-on-stack-overflow.html
 
 

Re: [YouTube-API] CORS is not working ! Jeffrey Posnick 10/9/12 6:41 AM
Hello Folks,

 Sorry for the lack of updates here (most of the focus has been shifted to Stack Overflow and the issue tracker). I'm told that CORS on uploads.gdata.youtube.com is "ready" again, so please let me know whether things work for you. I haven't had time to write up a full sample program yet, but after doing a quick test to ensure that the OPTIONS method is supported by uploads.gdata.youtube.com, it looks promising.

Cheers,
-Jeff Posnick, YouTube API Team
YouTube Developer Relations is hiring! developers.google.com/jobs


Re: [YouTube-API] CORS is not working ! Iwein Fuld 11/12/12 1:14 AM
I'm trying to get a CORS request going from a single page app. The point is to avoid a full page reload (like http://gdata-samples.googlecode.com/svn/trunk/gdata/youtube_upload_cors.html is still doing). There are generally two ways this can be done:

- Using a hidden iframe (ancient hack)
- or using XMLHttpRequest with FormData (CORS)

The latter is most elegant, but not supported in some inferior browsers. I'm in the lucky position that I may ignore those browsers.

Now I wrote the following code:

        var fd = new FormData();
        fd.append('token', token);
        fd.append('file', element.files[0]);
        var xhr = new XMLHttpRequest();
        xhr.upload.addEventListener("progress", uploadProgress, false);
        xhr.addEventListener("load", $scope.uploadComplete, false);
        xhr.addEventListener("error", $scope.uploadComplete, false);
        xhr.addEventListener("abort", $scope.uploadComplete, false);
        xhr.open("POST", $scope.uploadData.uploadUrl + '?nexturl=' + $location.absUrl());
        xhr.send(fd);

This works (as in, it uploads the whole file, whilst emitting progress events happily), but at the end it errors out. I'm not sure what I'm doing wrong, but I'd really love to see a sample using this strategy instead of the full page refresh. 


Cheers,
Iwein