Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

422 Unprocessable Entity on save #4

Open
cmcguff opened this issue Oct 21, 2014 · 1 comment
Open

422 Unprocessable Entity on save #4

cmcguff opened this issue Oct 21, 2014 · 1 comment

Comments

@cmcguff
Copy link

cmcguff commented Oct 21, 2014

The S3 upload is working fine - I can see the files on S3, but the actual save process is failing with

ActiveRecord::RecordInvalid - Validation failed: Direct upload url is invalid:

I'm not sure where to go with this, for me the model is called Import instead of Document and the field for the final file is import_file rather than upload.

The format for me looks like this:

DIRECT_UPLOAD_URL_FORMAT = %r{\Ahttps:\/\/s3\.amazonaws\.com\/#{BUCKET_NAME}\/(?<path>import_files\/.+\/(?<filename>.+))\z}.freeze
@uberllama
Copy link
Owner

Are you possibly using a virtual hosted style URL for your bucket? I.e. bucketname.s3.amazonaws.com rather than a path style URL s3.amazonaws.com/bucketname?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants