2

I would like to upload photo from Android client to Web Server via Restful like this:

  • URL:

http://domain.com/users/{user_id}/list

  • Method: POST

  • Content-type Image/JPEG

  • Server receive photo. But I don't know how to receive and save to folder.

Luc
  • 2,800
  • 2
  • 25
  • 46
  • 1
    Show us what you've tried so far – vee Jul 01 '13 at 02:41
  • I tried to post an image from Android client. So I don't know how to receive image by struts2. Example: Android upload file -> struts2: PhotosController handle photo -> Save to folder of server – Luc Jul 01 '13 at 02:49
  • 1
    The second link provides file upload code for struts2, I'll leave a full solution to someone else although between these links there shouldn't be much left http://stackoverflow.com/questions/4821334/limit-struts2-file-upload-max-size-without-uploading-the-whole-file http://stackoverflow.com/questions/10330503/how-to-display-imagebolb-type-in-jsp-page-from-mysql-db-in-struts-2-using-hibe – Quaternion Jul 01 '13 at 03:50

0 Answers0