how to tell carrierwave file already exists on s3

41 views
Skip to first unread message

cw-user

unread,
May 9, 2012, 9:26:50 AM5/9/12
to carri...@googlegroups.com
I have a service where files are uploaded to s3 via carrierwave.  After the file is uploaded, a api call is made to another service to tell it that a file has been uploaded.  I'd like to set it up so the file can be accessed as if it was uploaded via the second service.

in both services I have:

class Attachment
  include Mongoid::Document

  mount_uploader :file, AttachmentUploader
end

class AttachmentUploader < CarrierWave::Uploader::Base
  storage :fog
end


after saving the attachment on service one, service one then makes an api call to service two to let it know it uploaded a file, passing it the file.path of where it is located on S3.  I'd like to be able to take that and create another attachment on service 2 by passing carrierwave that path, but without actually having to upload a file.

is this possible?

Thanks


Reply all
Reply to author
Forward
0 new messages