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

Already on GitHub? Sign in to your account

Fix Scribd uploads with query parameters #3

Merged
merged 1 commit into from Jul 18, 2012

Conversation

Projects
None yet
2 participants
Contributor

daveworth commented Jul 18, 2012

Scribd was returning 602, unknown file extension, for uploads. The problem was
that the URLs being uploaded (from S3) included AWS credentials as query
parameters. The doctype that rscribd, via calls from scribd-carrierwave,
extracted from http://<amazon_s3_host>/file.pdf?AWS_PARAMETERS=TRUE was
pdf?AWS_PARAMETERS=TRUE. By replicating the file extension extraction code
from rscribd and adding logic to remove the query parameters and passing this as
type to rscribd the error disappears.

Dave Worth Fix Scribd uploads with query parameters
Scribd was returning 602, unknown file extension, for uploads.  The problem was
that the URLs being uploaded (from S3) included AWS credentials as query
parameters.  The doctype that rscribd, via calls from scribd-carrierwave,
extracted from `http://<amazon_s3_host>/file.pdf?AWS_PARAMETERS=TRUE` was
`pdf?AWS_PARAMETERS=TRUE`.  By replicating the file extension extraction code
from rscribd and adding logic to remove the query parameters and passing this as
`type` to rscribd the error disappears.
45e0ec5

@aubreyrhodes aubreyrhodes added a commit that referenced this pull request Jul 18, 2012

@aubreyrhodes aubreyrhodes Merge pull request #3 from daveworth/explicit_doctype_for_urls_with_q…
…uery_parameters

Fix Scribd uploads with query parameters
e465050

@aubreyrhodes aubreyrhodes merged commit e465050 into aubreyrhodes:master Jul 18, 2012

@milkfarm milkfarm added a commit to milkfarm/scribd-carrierwave that referenced this pull request Jan 23, 2013

@aubreyrhodes @milkfarm aubreyrhodes + milkfarm Merge pull request #3 from daveworth/explicit_doctype_for_urls_with_q…
…uery_parameters

Fix Scribd uploads with query parameters
84b3614
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment