Untitled


SUBMITTED BY: itsDaveLad

DATE: March 8, 2016, 4:30 p.m.

FORMAT: Text only

SIZE: 1.6 kB

HITS: 417

  1. FileService fileService = FileServiceFactory.getFileService();
  2. AppEngineFile file = fileService.createNewBlobFile("text/plain");
  3. FileWriteChannel writeChannel = fileService.openWriteChannel(file, true);
  4. writeChannel.write(ByteBuffer.wrap(content.getBytes()));
  5. writeChannel.closeFinally();
  6. BlobKey blobKey = fileService.getBlobKey(file);
  7. res.sendRedirect("/serve?blob-key=" + blobKey);
  8. HTTP ERROR 500
  9. Problem accessing /create_timetable. Reason:
  10. The Files API is disabled. Further information: https://cloud.google.com/appengine/docs/deprecations/files_api
  11. Caused by:
  12. com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: The Files API is disabled. Further information: https://cloud.google.com/appengine/docs/deprecations/files_api
  13. at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:515)
  14. at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:484)
  15. at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:461)
  16. at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:533)
  17. at java.security.AccessController.doPrivileged(Native Method)
  18. at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:530)
  19. at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  20. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  21. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  22. at java.lang.Thread.run(Thread.java:745)

comments powered by Disqus