Upplication / Amazon-S3-FileSystem-NIO2

An S3 File System Provider for Java 7
MIT License
122 stars 67 forks source link

Allow longer file names to be upload to S3 #120

Open pilec opened 5 years ago

pilec commented 5 years ago

Problem: When I have a file with a longer filename (around 200 characters) deeper in directories it used the whole path as a temp name of a file. Unfortunately, UNIX filesystems support only files up to 255 characters so the upload will fail with exception File name too long. S3 systems support file names up to 1024 characters as can be seen here - https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html so there is no reason to not accept this file to upload.

Solution: do not use the full depth of filename as a temporary name.