Skip to content Skip to sidebar Skip to footer

Upload File To Google Cloud Storage Using AngularJS Multipart Form Data

I'm trying to upload an image file to Google Cloud Storage from AngularJS using the multipart method specified in https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload#m

Solution 1:

I have been successfully uploading files with AngularJS through BlobStore. When you create an upload URL, you can set the Cloud Storage bucket name. Here is a Java example:

String uploadUrl = BlobstoreServiceFactory.getBlobstoreService()
   .createUploadUrl("callback-path",
      UploadOptions.Builder.withGoogleStorageBucketName("bucket-name"));

After a successful upload, your callback URL is called and you can get the blob's name.


Post a Comment for "Upload File To Google Cloud Storage Using AngularJS Multipart Form Data"