I've been trying to upload some files to my S3 bucket but found a bizarre error and I don't know if I'm the only one having it or if this is some restriction I'm not aware of.
I tried to upload several files with name AD_other_text.pdf and it failed but I changed the name to other_text.pdf and it worked, I need to keep original name and as far as I know it keeps their guidelines. Is AD_ a reserved word?
I use their graphic console to upload files
CodePudding user response:
As you point out, the filename "AD_other_text.pdf" is a valid key for S3.
You mention that you're using the web console to attempt to upload the file. When you perform an upload of a file, It's likely that you have some sort of mechnism blocking the upload due to the "AD" at the start of the prefix.
When you perform an upload using the web console, after some work to prepare, your browser will make a request to a URL like http://example-bucket.s3.us-east-1.amazonaws.com/AD_other_text.pdf. If you have some ad blocking plugin that's decided to block all requests to any URL that starts with "AD", then this will fail, and the upload itself will fail.
You should disable all plugins, starting with ones that block ads first, and retry the operation. If the upload still fails, watch the network activity using your browsers developer tools during an upload to pinpoint the failure.
And, it's probably a good idea to instruct any ad-blocking plugins you use to stay disabled for *.amazonaws.com to prevent these sort of surprises in the future.
