1

I need to upload image to the server, where SmartGWT webapplication is running... after trying this solution ( Basic File upload in GWT - first answer), when I have created independent http servlet with mapping in web.xml, I'm able to receive uploaded file on server side (in linked solution - "out" is ByteArrayOutoutStream), so it is in server RAM... Problem is, how to save file to server file system storage.

When I tried to create FileOutputStream instead of ByteArrayOutoutStream, an exception has been thrown that it is restricted class in Google Apps Engine.

Any ideas, how to store file to server, when it is restricted in GAE? Or how can I tell, that I don't want the FileUploading servlet to run under GAE? Thanks for any ideas...

Community
  • 1
  • 1
tomas
  • 669
  • 2
  • 11
  • 23

1 Answers1

0

You have no write permissions. You may, however, store the image as a blob or by using the distributed datastore.

From TFA:

Writing to local files is not supported in App Engine due to the distributed nature of your application. Instead, data which must be persisted should be stored in the distributed datastore. For more information see the documentation on the runtime sandbox.

Chris Cashwell
  • 22,308
  • 13
  • 63
  • 94