Google Cloud Storage on Local Server: Invalid Filename

I am trying to "upload" an array of bytes to a local GAE / J development server (1.8.1, Eclipse Juno) using the 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 causes the following exception:

 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) 

This makes sense, given the existence of an extra colon in the name of the target file (encoded_gs_key: L2dzL015QnVja2V0L2Zvbw).

The question is how to prevent the local development server from trying to create an invalid file name?

+4
source share
3 answers

Finally, I found the source of the error. If I run the development server inside the hard drive, an error will occur. If I run it outside of the error, it will disappear. So the problem seems to be how truecrypt handles files.

+4
source

I think your best bet is perhaps to delve here to enable file name character conversion

+2
source

In my case, it was a file system type. I save files to usb drive compatible with FAT32. After I switched to NTFS, everything works now. What an unpleasant mistake.

PS. @Andre's answer inspired me. I can’t imagine what he went through to understand this.

+2
source

Source: https://habr.com/ru/post/1489940/


All Articles