Skip to main content
deleted 37 characters in body; edited title
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

Getting s3 objects with railsRails

I have been using aws-sdk gem with railsRails, for uploading and downloading objects,and its. I believe it's working fine, but i am thinking, like this is my demo.

Demo code:

begin

s3 = AWS::S3.new
bucket = s3.buckets[ENV['BUCKET_NAME']]
bucket.objects.create(fname, data)
object = bucket.objects[fname]
exported_url   =  object.url_for(:get, {expires: 3.weeks,
             response_content_type: "text/csv", response_content_disposition: 
"attachment; filename=#{fname}.csv"}).to_s
rescue Aws::S3::Errors::ServiceError => e
 puts e.message
end

so isAre there any issues ,if uplodaingif uploading a large file to s3, is3? I mean, that issues will affect my code, any suggestions?, will. Will it handle that situation for large files, should i? Should I go for the multipart options in s3s3?

Getting s3 objects with rails

I have been using aws-sdk gem with rails, for uploading and downloading objects,and its working fine, but i am thinking, like this is my demo code

begin

s3 = AWS::S3.new
bucket = s3.buckets[ENV['BUCKET_NAME']]
bucket.objects.create(fname, data)
object = bucket.objects[fname]
exported_url   =  object.url_for(:get, {expires: 3.weeks,
             response_content_type: "text/csv", response_content_disposition: 
"attachment; filename=#{fname}.csv"}).to_s
rescue Aws::S3::Errors::ServiceError => e
 puts e.message
end

so is there any issues ,if uplodaing a large file to s3, i mean, that issues will affect my code, any suggestions?, will it handle that situation for large files, should i go for the multipart options in s3

Getting s3 objects with Rails

I have been using aws-sdk gem with Rails, for uploading and downloading objects. I believe it's working fine.

Demo code:

begin

s3 = AWS::S3.new
bucket = s3.buckets[ENV['BUCKET_NAME']]
bucket.objects.create(fname, data)
object = bucket.objects[fname]
exported_url   =  object.url_for(:get, {expires: 3.weeks,
             response_content_type: "text/csv", response_content_disposition: 
"attachment; filename=#{fname}.csv"}).to_s
rescue Aws::S3::Errors::ServiceError => e
 puts e.message
end

Are there any issues if uploading a large file to s3? I mean, that issues will affect my code. Will it handle that situation for large files? Should I go for the multipart options in s3?

Source Link
amtest
  • 111
  • 1

Getting s3 objects with rails

I have been using aws-sdk gem with rails, for uploading and downloading objects,and its working fine, but i am thinking, like this is my demo code

begin

s3 = AWS::S3.new
bucket = s3.buckets[ENV['BUCKET_NAME']]
bucket.objects.create(fname, data)
object = bucket.objects[fname]
exported_url   =  object.url_for(:get, {expires: 3.weeks,
             response_content_type: "text/csv", response_content_disposition: 
"attachment; filename=#{fname}.csv"}).to_s
rescue Aws::S3::Errors::ServiceError => e
 puts e.message
end

so is there any issues ,if uplodaing a large file to s3, i mean, that issues will affect my code, any suggestions?, will it handle that situation for large files, should i go for the multipart options in s3