I Want to download mor than 5 songs at a time. I Tried that
http://stackoverflow.com/questions/3498281/mass-downloading-from-rails-maybe-with-paperclip
using that web site.

Is there any other way to download songs without using zip file.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Walter Lee Davis at Jan 17, 2012 at 2:13 pm

    On Jan 17, 2012, at 7:58 AM, Deepika V. wrote:

    I Want to download mor than 5 songs at a time. I Tried that
    http://stackoverflow.com/questions/3498281/mass-downloading-from-rails-maybe-with-paperclip
    using that web site.

    Is there any other way to download songs without using zip file.
    A browser will only download single files, so Zip is probably your best bet (to be cross-platform and all).

    Walter

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Deepika Vummiti at Jan 18, 2012 at 10:46 am
    Hi,

    Thanks for your reply, I will do in that way.

    Thanks,
    Deepika.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Deepika Vummiti at Jan 19, 2012 at 5:52 am
    Hi,

    I Have download controller in my application.. In that i have def
    download_ordered_songs method, in that i have given my
    # AWS::S3::Base.establish_connection!(
    # :access_key_id => 'Put your Access Key ID Here',
    # :secret_access_key => 'Put your Secred Access Key here'
    # )

    and the codings related to

    @files = File.all

    dir = "#{Time.now.to_date}-#{order.id}"

    if Dir["/var/www/my-web-site/shared/songs/#{dir}"].empty?
    Dir.mkdir("/var/www/my-web-site/shared/songs/#{dir}")
    end
    path =
    "/var/www/my-web-site/shared/songs/#{Time.now.to_date}-#{order.id}"



    if (file_size = File.size(mp3_path)) >= (original_file_size =
    AWS::S3::S3Object.find(song.full_track,"#{b_name}").size)
    downloadable.update_attribute(:was_downloaded,true)
    send_file(mp3_path, :disposition => 'attachment', :encoding =>
    'utf8')
    else
    downloadable.update_attribute(:error, "File size was supposed to
    be #{original_file_size} but was #{file_size}")
    end
    rescue Exception => e
    p "//////////////////////////////////////Error** #{e.message} **"
    flash[:error] = e.message
    redirect_to order_path(:id => params[:order_id])
    end

    --------------------------

    If i click download link, it displaying no such file or directory
    var/www/my-web-site/shred/songs error..

    Why this error is occurring, is that i need to do any settings in my
    local machine...

    Please I'm held up in this more than 2 days.. Waiting for the solution.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 17, '12 at 12:58p
activeJan 19, '12 at 5:52a
posts4
users2
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2023 Grokbase