I am trying to get a file from the amazon bucket but it says "string contains null byte". any idea how to get the file to download like a regular file? The file is there at the location. f = Heypub.value @bucket send_file( f , :type => "FileExtns[ext][''mime'']", :disposition => ''attachment'') -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Anyone? I can see the file contents in the log file if I logger.info f. On Jan 29, 10:15 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am trying to get a file from the amazon bucket but it says "string > contains null byte". any idea how to get the file to download like a > regular file? The file is there at the location. > > f = Heypub.value @bucket > send_file( f , :type => "FileExtns[ext][''mime'']", :disposition => > ''attachment'')-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
or this version is the same thing: f = S3Object.value @bucket, ''mybucket'' On Jan 30, 3:22 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anyone? I can see the file contents in the log file if I logger.info > f. > > On Jan 29, 10:15 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I am trying to get a file from the amazon bucket but it says "string > > contains null byte". any idea how to get the file to download like a > > regular file? The file is there at the location. > > > f = Heypub.value @bucket > > send_file( f , :type => "FileExtns[ext][''mime'']", :disposition => > > ''attachment'')-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Verify it the file is ok first by writing to the filesystem. You may need to attempt to isolate the problem without much information. On Sun, Jan 31, 2010 at 7:55 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> or this version is the same thing: > > f = S3Object.value @bucket, ''mybucket'' > > On Jan 30, 3:22 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Anyone? I can see the file contents in the log file if I logger.info > > f. > > > > On Jan 29, 10:15 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I am trying to get a file from the amazon bucket but it says "string > > > contains null byte". any idea how to get the file to download like a > > > regular file? The file is there at the location. > > > > > f = Heypub.value @bucket > > > send_file( f , :type => "FileExtns[ext][''mime'']", :disposition => > > > ''attachment'') > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I did, gives me the same error. no idea what could be the issue. seems like a send_file issue?? On Sun, Jan 31, 2010 at 7:07 PM, Curtis Schofield < curtis.schofield-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Verify it the file is ok first by writing to the filesystem. > > You may need to attempt to isolate the problem without much information. > > > On Sun, Jan 31, 2010 at 7:55 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> or this version is the same thing: >> >> f = S3Object.value @bucket, ''mybucket'' >> >> On Jan 30, 3:22 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > Anyone? I can see the file contents in the log file if I logger.info >> > f. >> > >> > On Jan 29, 10:15 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > >> > > I am trying to get a file from the amazon bucket but it says "string >> > > contains null byte". any idea how to get the file to download like a >> > > regular file? The file is there at the location. >> > >> > > f = Heypub.value @bucket >> > > send_file( f , :type => "FileExtns[ext][''mime'']", :disposition => >> > > ''attachment'') >> >> -- >> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
also are you using http://amazon.rubyforge.org/ ? the examples that it presents look similar to yours. On Sun, Jan 31, 2010 at 5:07 PM, Curtis Schofield < curtis.schofield-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Verify it the file is ok first by writing to the filesystem. > > You may need to attempt to isolate the problem without much information. > > > On Sun, Jan 31, 2010 at 7:55 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> or this version is the same thing: >> >> f = S3Object.value @bucket, ''mybucket'' >> >> On Jan 30, 3:22 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > Anyone? I can see the file contents in the log file if I logger.info >> > f. >> > >> > On Jan 29, 10:15 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > >> > > I am trying to get a file from the amazon bucket but it says "string >> > > contains null byte". any idea how to get the file to download like a >> > > regular file? The file is there at the location. >> > >> > > f = Heypub.value @bucket >> > > send_file( f , :type => "FileExtns[ext][''mime'']", :disposition => >> > > ''attachment'') >> >> -- >> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
It gives you the same error? I mean open a file and write it to the server. open(''filename.png'',''w'') do | etc. If the above and send files gives you the same error s very likely that you are using the api mistaken and need to check your assumptions and understanding carefully. On Sun, Jan 31, 2010 at 5:11 PM, Chris Habgood <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I did, gives me the same error. no idea what could be the issue. seems > like a send_file issue?? > > On Sun, Jan 31, 2010 at 7:07 PM, Curtis Schofield < > curtis.schofield-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Verify it the file is ok first by writing to the filesystem. >> >> You may need to attempt to isolate the problem without much information. >> >> >> On Sun, Jan 31, 2010 at 7:55 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> or this version is the same thing: >>> >>> f = S3Object.value @bucket, ''mybucket'' >>> >>> On Jan 30, 3:22 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> > Anyone? I can see the file contents in the log file if I logger.info >>> > f. >>> > >>> > On Jan 29, 10:15 pm, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> > >>> > > I am trying to get a file from the amazon bucket but it says "string >>> > > contains null byte". any idea how to get the file to download like a >>> > > regular file? The file is there at the location. >>> > >>> > > f = Heypub.value @bucket >>> > > send_file( f , :type => "FileExtns[ext][''mime'']", :disposition => >>> > > ''attachment'') >>> >>> -- >>> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >>> >> -- >> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.