Comments (6)
Thanks for reporting your struggle and the solution here @aximuseng!
from carrierwave-aws.
I had a hunch that is was Dropzone (which still may be the issue). My old app used 4.x and this new one was 5.x. I downgraded and the issue persists.
I have another uploader that works fine - the issue is just this one which happens to use Dropzone.js
from carrierwave-aws.
I switched to FOG and I get the same error - looks like a temp file issue. I get a better error message via fog:
Excon::Error::NotFound
Expected(200) <=> Actual(404 Not Found)
excon.error.response
:body => "<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>uploads/tmp/1571981392-820410573725319-0002-3934/LDT_export.xlsx</Key><RequestId>968BFF30B5502600</RequestId><HostId>yoqwixTfgqxppxOTsC6yKI2NJDY8YvmsuHFqvJkaC3IfzauEvyGBSch/b2pu/gdrTb6taxQSUQc=</HostId></Error>"
:cookies => [
]
:headers => {
"Content-Type" => "application/xml"
"Date" => "Fri, 25 Oct 2019 05:29:55 GMT"
"Server" => "AmazonS3"
"x-amz-delete-marker" => "true"
"x-amz-id-2" => "yoqwixTfgqxppxOTsC6yKI2NJDY8YvmsuHFqvJkaC3IfzauEvyGBSch/b2pu/gdrTb6taxQSUQc="
"x-amz-request-id" => "968BFF30B5502600"
"x-amz-version-id" => "NPV4VoXhQ8OrY2vOSqmjYLrgEqELxjlt"
}
:host => "otproduction.s3.us-west-2.amazonaws.com"
:local_address => "159.203.1.40"
:local_port => 51808
:path => "/locations/hdnw2xf8/uploads/mc4x2klf/LDT_export.xlsx"
:port => 443
:reason_phrase => "Not Found"
:remote_ip => "52.218.217.193"
:status => 404
:status_line => "HTTP/1.1 404 Not Found\r\n"
I don't think it's related to this gem - perhaps carrierwave specific.
from carrierwave-aws.
This issue strikes again. I thought I had this addressed. The error would just show up as an annoyance in my Sentry.io logs. Now in my recent update throws an error (sort of).
Here is my code:
if feed_params[:file]
upload = @feedable.uploads.new(notes: feed_params[:notes], uploadable_type: @feed.feedable.class.base_class.name, uploadable_id: @feed.feedable.id)
upload.file = feed_params[:file]
upload.save
@feed.update(linkable_type: 'Upload', linkable_id: upload.id)
end
I am creating a record and then if the user uploaded a file I create a new upload. The file uploads and is saved in the DB. The controller stops after the upload.save and throws the error but not a full exception. If I manually refresh the upload is there but that @feed.update after the save is never executed.
Zero clue where to look next on this.
from carrierwave-aws.
Current Gemfile.lock:
carrierwave (2.1.0)
activemodel (>= 5.0.0)
activesupport (>= 5.0.0)
addressable (~> 2.6)
image_processing (~> 1.1)
mimemagic (>= 0.3.0)
mini_mime (>= 0.1.3)
carrierwave-aws (1.5.0)
aws-sdk-s3 (~> 1.0)
carrierwave (~> 2.0)
This one does NOT use dropzone.
from carrierwave-aws.
I did some digging in my uploaders. The offending uploader had this:
def full_filename (for_file = model.file.file)
"preview_thumb.jpg"
end
I was setting my versions to static names. I don't need this and don't know why this fixes it or caused the problem but hopefully this helps anyone down the road that hits this error. Also not sure why fog had the same error.
from carrierwave-aws.
Related Issues (20)
- Carrierwave / AWS S3 Upload Endpoints HOT 9
- Image updates don't work when images with same name are reuploaded HOT 1
- Uploads fail HOT 2
- uploader fails, returns 400 Bad Request errors HOT 5
- Url returns nill for versions uploaded in background HOT 1
- Release new version for Carrierwave 2.1 HOT 2
- Configure with IAM Role HOT 4
- xlsx content-type is wrong HOT 3
- Allow to use a directory inside the bucket HOT 3
- AWS SDK 2.0 is EOL HOT 10
- supports DigitalOcean Spaces? HOT 1
- Caching seems to not work HOT 1
- Could not read file contents in test environment HOT 2
- content-type octet-stream issue HOT 5
- Setting ACLs can be turned off
- Ready to CarrierWave 3.0? HOT 2
- Support for "path_style" OFFICIALLY with a flag for the s3 hosts that use MinIO, DigitalOceanSpaces, and other software that support S3 API but not the default S3 virtualhost bucket names in the URL HOT 2
- Updating a file where version has overridden `full_filename` fails HOT 1
- aws_attributes broken for ActiveSupport::OrderedOptions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carrierwave-aws.