I am trying to "upload" a byte array to the local GAE/J (1.8.1, Eclipse Juno) development Server using Google Cloud Storage Client Library:
byte[] byteContent = new byte[] {1, 2, 3, 4, 5};
GcsFilename fileName = new GcsFilename("MyBucket", "foo");
GcsOutputChannel outputChannel =
GcsServiceFactory.createGcsService().createOrReplace(fileName, GcsFileOptions.getDefaultInstance());
outputChannel.write(ByteBuffer.wrap(byteContent));
outputChannel.close();
Attempting this, the following Exception is thrown:
WARNING: Caught IOException while attempting to write blob
java.io.FileNotFoundException: C:\dev\workspace\gaeTestProjekt\war\WEB-INF\appengine-generated\encoded_gs_key:L2dzL015QnVja2V0L2Zvbw (The filename, directory name, or volume label syntax is incorrect)
Which makes sense given the existence of an additional colon in the name of the target file (encoded_gs_key:L2dzL015QnVja2V0L2Zvbw).
Question is, how do I prevent the local development Server from attempting to create an invalid filename ?
I finally found the source of the error. If I run the development server inside a truecrypt drive the error occurs. If I run it outside the error is gone. So it seems to be a problem with how truecrypt is handling files.
I think your best bet is to maybe dig around here enable file name character translation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With