lib/cloud_crowd/asset_store/s3_store.rb
# Save a finished file from local storage to S3. Save it publicly unless
# we're configured to use S3 authentication. Authenticated links expire
# after one day by default.
Save a finished file from local storage to S3. Save it publicly unless
we're configured to use S3 authentication. Authenticated links expire
after one day by default.
Save a finished file from local storage to S3 . Save it publicly unless we ' re configured to use S3 authentication . Authenticated links expire after one day by default .
def save(local_path, save_path)
        if @use_auth
          @bucket.put(save_path, File.open(local_path), {}, 'private')
          @s3.interface.get_link(@bucket, save_path)
        else
          @bucket.put(save_path, File.open(local_path), {}, 'public-read')
          @bucket.key(save_path).public_link
        end
      end
def save ( local_path , save_path ) if @use_auth @bucket . put ( save_path , File . open ( local_path ) , { } , 'private' ) @s3 . interface . get_link ( @bucket , save_path ) else @bucket . put ( save_path , File . open ( local_path ) , { } , 'public-read' ) @bucket . key ( save_path ) . public_link end end
Save a finished file from local storage to S3.
Save a finished file from local storage to S3 .
local_path
<not_specific>
save_path
<not_specific>