Hi! While this is a very interesting question, it would probably be better in Stack Overflow. Asking questions about the Google Cloud Platform, you have three venues available to you:
1- Issue Tracker <https://code.google.com/p/googleappengine/issues/list>: Should be used to either send feature requests to us, or to draw our attention on a defect. 2- StackOverflow <http://stackoverflow.com/>: To ask technical, how-to questions. Always make sure to read their help center and ask on topic <http://stackoverflow.com/help/on-topic> questions. 3- GoogleGroups: To ask questions that, while still technical, are not on topic for Stack Overflow (so "which book should I read to start using this platform" or "I'm using this method, what is the expected speed when compared to "that method""). You can also come here to develop Feature Requests before sending them to the Issue tracker. With that in mind, your question seems to fall more under the second one. So I would definitely ask something like this on Stack. Be aware that the same people who monitor this group also monitor and answer on Stack, so you have the same people answering there, with the added benefit of the huge community behind Stack Overflow. Cheers! On Monday, September 7, 2015 at 2:12:51 PM UTC-4, setv tech wrote: > > I want to send a video file to GAE Blobstore using AngularJS following are > the code snippets. > > > I am getting the upload url through endpoint API call and using it in Form > action field and http POST call. > > > When the BlobKey was retrieved it was always returned as *null*. The > admin console has entry for the item in '*BlobUploadSession*', but I > could not verify whether the video file was uploaded. > > > How to identify whats going wrong when the BlobKey was retrieved? > > > HTML: > > <form name="videoForm" action="{{uploadUrl}}" ng-init="init()" novalidate > role="form"> > <div class="form-group"> > <label for="title">Video Title</label> > <input id="title" type="text" name="title" ng-model="video.title" > class="form-control"/> > </div> > <div class="form-group"> > <label for="videoFile">File Path</label> > <input id="videoFile" type="file" name="videoFile" > class="form-control" > onchange="angular.element(this).scope().setFile(this)"/> > </div> > <button ng-click="addVideo(videoForm)" class="btn btn-primary">Video Add > </button></form> > > > JS: > > videoApp.controllers.controller('videoAddCtrl', > function ($scope, $log, $http, oauth2Provider, HTTP_ERRORS) { > > $scope.video = $scope.video || {}; > > $scope.init = function () { > gapi.client.video.getUploadUrl(). > execute(function (resp) { > $scope.$apply(function () { > if (resp.error) { > if (resp.code && resp.code == HTTP_ERRORS.UNAUTHORIZED) { > oauth2Provider.showLoginModal(); > return; > } > } else { > console.log(resp.result.uploadUrl); > $scope.uploadUrl = resp.result.uploadUrl; > } > }); > });}; > > $scope.submit = function () { > console.log($scope.files); > console.log($scope.uploadUrl); > return $http({ > method: 'POST', > url: $scope.uploadUrl, > headers: { 'Content-Type': undefined }, > data: { > file: $scope.files, > }, > transformRequest: function(data) { > var formData = new FormData(); > angular.forEach(data, function(value, key) { > formData.append(key, value); > }); > return formData; > } > }).success(function(data) { > console.log("video " + $scope.video.title + " Successfully Uploaded"); > }).error(function(data){ > console.log(data); > });}; > > $scope.addVideo = function (videoForm) { > console.log($scope.video.title); > $scope.submit(videoForm);}; > > $scope.setFile = function(element) { > $scope.$apply(function($scope) { > $scope.files = element.files; > console.log($scope.files); > });} > }); > > > > Java Servlet: > > public class UploadVideo extends HttpServlet { > > private static final Logger Log = > Logger.getLogger(UploadVideo.class.getName()); > > private BlobstoreService blobstoreService = > BlobstoreServiceFactory.getBlobstoreService(); > > @Override > public void doPost(HttpServletRequest req, HttpServletResponse res) > throws ServletException, IOException { > Log.info("+Enter"); > > Map<String, List< > > ... -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/fc5ef56f-b726-4476-86b0-328244ea36db%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
