0

I have a form which collects the Employee details. I have an option to upload the employee image. I need to store all these data in datastore through ajax. I am using Spring MVC to handle all the requests. I have tried the sample program given in appengine docs using form action. But how to do this operation with ajax? Thanks in advance...

Dan McGrath
  • 41,220
  • 11
  • 99
  • 130
User_007
  • 165
  • 2
  • 15

1 Answers1

0

You asked your question in a very abstract manner, so here is your abstract answer:

  1. Store the images in Blobstore or Google Cloud Storage
  2. The other form elements will be passed as query params to the generated upload URL
  3. Once Blobstore/GCS is done processing the upload, it will send a request to the callback route you specified, and that request handler will see a request with all the original params from your form, including a file metadata object.
  4. If you want to know how to do a file upload with ajax instead of a form element, check the link provided by the other user in a comment. You can also try google, to learn the particular syntax of sending file uploads from whichever ajax library you're using.
Nick
  • 3,581
  • 1
  • 14
  • 36