Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8025179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:04:53+00:00 2026-06-04T23:04:53+00:00

I am trying to programmatically upload some files to the blobstore and also update

  • 0

I am trying to programmatically upload some files to the blobstore and also update something in the datastore. It could be done using a specialized servlet and CURL to do it, but it would be more elegant to use the remote api.
Is it possible to use the file service thru appengine’s remote apis?
If yes, why am I getting this exception when executing bos.write(b)?
Thanks
code:

String localFileName = "c:\\actcut fail.jpg";
                AppEngineFile aeF = fileService.createNewBlobFile("", "actcutfail.jpg");
                FileWriteChannel writeChannel = (FileWriteChannel) fileService.openWriteChannel(aeF, true); 
                BufferedOutputStream bos = new BufferedOutputStream(Channels.newOutputStream(writeChannel));
                FileInputStream fis = new FileInputStream(localFileName);
                try {
                    while (true) {
                        int b = fis.read();
                        bos.write(b);
                    }
                } catch (EOFException eofex) {
                    // end of file reached
                } catch (Exception ex) {
                    ex.printStackTrace();
                } finally {
                    fis.close();
                    bos.flush();
                    bos.close();
                    writeChannel.closeFinally();
                    System.out.println("uploaded blob file with key=" + fileService.getBlobKey(aeF).getKeyString());
                }

exception:

java.io.IOException
    at com.google.appengine.api.files.FileServiceImpl.translateException(FileServiceImpl.java:601)
    at com.google.appengine.api.files.FileServiceImpl.makeSyncCall(FileServiceImpl.java:574)
    at com.google.appengine.api.files.FileServiceImpl.append(FileServiceImpl.java:510)
    at com.google.appengine.api.files.FileServiceImpl.append(FileServiceImpl.java:255)
    at com.google.appengine.api.files.FileWriteChannelImpl.write(FileWriteChannelImpl.java:52)
    at com.google.appengine.api.files.FileWriteChannelImpl.write(FileWriteChannelImpl.java:44)
    at java.nio.channels.Channels.write(Channels.java:63)
    at java.nio.channels.Channels.access$000(Channels.java:47)
    at java.nio.channels.Channels$1.write(Channels.java:134)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:78)
    at cri.uploaddevalle.UploadDevalle.main(UploadDevalle.java:61)
Caused by: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 10: File not opened: /blobstore/writable:GlPgcwTQdPtgYVY_Jpk9hg
    at com.google.appengine.api.files.dev.LocalFileService.throwError(LocalFileService.java:206)
    at com.google.appengine.api.files.dev.LocalFileService.append(LocalFileService.java:352)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:498)
    at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:452)
    at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:430)
    at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:463)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:460)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
java.io.IOException
    at com.google.appengine.api.files.FileServiceImpl.translateException(FileServiceImpl.java:601)
    at com.google.appengine.api.files.FileServiceImpl.makeSyncCall(FileServiceImpl.java:574)
    at com.google.appengine.api.files.FileServiceImpl.append(FileServiceImpl.java:510)
    at com.google.appengine.api.files.FileServiceImpl.append(FileServiceImpl.java:255)
    at com.google.appengine.api.files.FileWriteChannelImpl.write(FileWriteChannelImpl.java:52)
    at com.google.appengine.api.files.FileWriteChannelImpl.write(FileWriteChannelImpl.java:44)
    at java.nio.channels.Channels.write(Channels.java:63)
    at java.nio.channels.Channels.access$000(Channels.java:47)
    at java.nio.channels.Channels$1.write(Channels.java:134)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at cri.uploaddevalle.UploadDevalle.main(UploadDevalle.java:69)
Caused by: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 10: File not opened: /blobstore/writable:GlPgcwTQdPtgYVY_Jpk9hg
    at com.google.appengine.api.files.dev.LocalFileService.throwError(LocalFileService.java:206)
    at com.google.appengine.api.files.dev.LocalFileService.append(LocalFileService.java:352)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:498)
    at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:452)
    at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:430)
    at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:463)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:460)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T23:04:55+00:00Added an answer on June 4, 2026 at 11:04 pm

    The File API isn’t currently fully supported over remote_api. You should be able to get a file upload URL with it, but you’ll need to post to a custom servlet if you want to actually upload files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to (HTTP) upload a binary file programmatically from within VBA. I intend
I'm trying to upload a file with a client application using BITS (Microsoft's Background
I'm trying to upload a file to SharePoint programmatically via a Mac Application that
I am trying to simulate an asynchronous file upload using an iframe. Here is
I'm trying to programmatically send an email of all of the dll files and
I'm trying to programmatically insert a dijit.form.Button into some HTML and my code goes
So I am trying to programmatically browse and I want to upload a file
I am trying to programmatically remove rows from a Microsoft Access Database using a
I'm trying to programmatically load some clojure libraries to make a simple auto-test program.
I'm trying to programmatically encrypt configuration sections of App.config and Web.config files. In the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.