Hassan Schroeder | 19 Jul 23:32

Re: File upload and doc type


On Sat, Jul 19, 2008 at 12:57 PM, Pål Bergström
<rails-mailing-list@...> wrote:
>
> Sorry, but how hard can it be? Can Rails handle a file upload or not? I
> mean other than images and make them accessible by download.

Not hard at all, apparently. :-)

Since I'd never done this in Rails and knew I'll need it soon, I just
created a new project (Rails 2.1), installed the attachment_fu plugin
and, following this handy-dandy tutorial:
  <http://clarkware.com/cgi/blosxom/2007/02/24#FileUploadFu>
:: created an upload tester in about 15 minutes.

I uploaded a Word (97, .doc) file and a PDF file. And then opened the
stored files successfully.

So I think it's a given that Rails (or at least attachment_fu) can handle
whatever binary file type you have. :-)

Have you compared checksums of the two versions of the file you're
having trouble with? Are you *sure* you downloaded it using FTP
*in binary mode*?

--

-- 
Hassan Schroeder ------------------------ hassan.schroeder@...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
(Continue reading)

Pål Bergström | 20 Jul 00:00

Re: File upload and doc type


Hassan Schroeder wrote:
> On Sat, Jul 19, 2008 at 12:57 PM, 

> I uploaded a Word (97, .doc) file and a PDF file. And then opened the
> stored files successfully.
> 
> So I think it's a given that Rails (or at least attachment_fu) can 
> handle
> whatever binary file type you have. :-)
> 
> Have you compared checksums of the two versions of the file you're
> having trouble with? Are you *sure* you downloaded it using FTP
> *in binary mode*?
> 
> --
> Hassan Schroeder ------------------------ hassan.schroeder@...

If attachment_fu works then it should work. I would like to learn it 
myself without any plugin. I believe I will learn more from that, and to 
be more free to what I want to do.

It's binary.

The problem is uploading. No problem downloading a "good" file that's 
been uploaded by ftp.
--

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

--~--~---------~--~----~------------~-------~--~----~
(Continue reading)

Hassan Schroeder | 20 Jul 00:11

Re: File upload and doc type


On Sat, Jul 19, 2008 at 3:00 PM, Pål Bergström
<rails-mailing-list@...> wrote:

> The problem is uploading.

OK, so there's something wrong with your upload code -- you might
be able to get some insight by looking at how attachment_fu does it,
but whatever.

As I said, comparing checksums would be my first move. Maybe try a
couple of small text files, too, just for comparison.

Good luck,
--

-- 
Hassan Schroeder ------------------------ hassan.schroeder@...

--~--~---------~--~----~------------~-------~--~----~
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@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Pål Bergström | 20 Jul 00:21

Re: File upload and doc type


Hassan Schroeder wrote:
> On Sat, Jul 19, 2008 at 3:00 PM, 
> P�l Bergstr�m<rails-mailing-list@...> wrote:
> 
>> The problem is uploading.
> 
> OK, so there's something wrong with your upload code -- you might
> be able to get some insight by looking at how attachment_fu does it,
> but whatever.
> 
> As I said, comparing checksums would be my first move. Maybe try a
> couple of small text files, too, just for comparison.
> 
> Good luck,
> --
> Hassan Schroeder ------------------------ hassan.schroeder@...

Got the same idea. I'm looking at it now.

Thanks for the help.
--

-- 
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
(Continue reading)


Gmane