acts_as_attachment or similar to upload mp3's ?

All of the examples I have found for acts_as_attachment have been for
images and thumbnails. I have not found alot of good documentation on
this. The techno weenie site has some documentation but it's not
complete. I was not really able to figure out image uploads completely
until I used the example in the Rails cookbook. I am not finding good
examples for mp3 uploads and am considering trying to do it in a more
primitive way.

You don't need to be uploading images to use acts_as_attachment. I'm
using it to upload any type of file right out of the box and I don't
have RMagik installed.

-Michael
http://javathehutt.blogspot.com

What do you set :content_type to be ? I may try it, I was affraid I
would code up a bunch of stuff only to find myself stumped on why it
wasn't working.
Other than content_type I'm not sure what else might be different ?

Are you developing on unix or windows ? I am also concerned with
problems on windows which is probably not as well supported for new
stuff. I develop my stuff on windows and then upload to a unix server.
There is some messages that say this acts_as is under heavy dev and I
had a problem with the thumbnail part of the image upload not working
so I had to write some of my own custom code for that. If I get stuck
with a problem, I haven't got alot of documentation resources to
figure it out and I want to get this done.

What do you set :content_type to be ? I may try it, I was affraid I
would code up a bunch of stuff only to find myself stumped on why it
wasn't working.
Other than content_type I'm not sure what else might be different ?

The content_type option is only for validations to restrict what's
allowed. You can leave it empty, or set it to the various mp3 content
types if you like.

Are you developing on unix or windows ? I am also concerned with
problems on windows which is probably not as well supported for new
stuff. I develop my stuff on windows and then upload to a unix server.
There is some messages that say this acts_as is under heavy dev and I
had a problem with the thumbnail part of the image upload not working
so I had to write some of my own custom code for that. If I get stuck
with a problem, I haven't got alot of documentation resources to
figure it out and I want to get this done.

The plugin is not new by any means. Its roots began with Mephisto
about a year ago, and I've personally used it in several projects in a
variety of uses. It contains a lot of unit tests to cover its
functionality. Course, it's not perfect, so tested patches are
welcome.

I recently completed a major refactoring called attachment_fu, which
is what I use now in all my projects. It works nearly the same way,
but is more flexible with processors/backends. You can now save
attachments to s3 (sort of experimental still), or write your own
custom backend to process MP3 info data (as an example).

Cheers,

> You can now save
> attachments to s3 (sort of experimental still),

Ha, since two weeks there is a 'extend acts_as_attachment to serve S3 backed files' on my todo list :slight_smile:

Hopefully I will get to play with your code this week and give you some feedback.

Regards,
Jonathan

It's not my code actually, I haven't done much more than run the
remote tests against ParkPlace :slight_smile: But yes, feedback/patches are more
than welcome :slight_smile:

I've been using it in several apps and once we got a few things straightened, it's been working great.

It's a nice convenience.

Hey, thanks. Here is a question. After I finish this stuff I am
working on I may try to do work on another site that is partly
finished. A friend of mine may want to upload records as a spreadsheet
instead of through an upload form. I may want to make it flexible to
work both ways however. If she uploads using a spreadsheet. The
spreadsheet would have file names in one column, but I would actually
upload the files to a directory and the load the spreadsheet. I'm
guessing if I want to still use acts_as_attachment that it may
complicate things. Possibly I would have a base class and the one
parent class for attachement and another for spreadsheet upload. I'm
not sure, but that may all be farther down the road.

Hey, thanks. Here is a question. After I finish this stuff I am
working on I may try to do work on another site that is partly
finished. A friend of mine may want to upload records as a spreadsheet
instead of through an upload form. I may want to make it flexible to
work both ways however. If she uploads using a spreadsheet. The
spreadsheet would have file names in one column, but I would actually
upload the files to a directory and the load the spreadsheet. I'm
guessing if I want to still use acts_as_attachment that it may
complicate things. Possibly I would have a base class and the one
parent class for attachement and another for spreadsheet upload. I'm
not sure, but that may all be farther down the road.

The plugin is for storing attachments. It sounds like you just want
to read and throw the spreadsheet away.

Hi Rick,

It's sort of like this. The spreadsheet would have the file name of a
jewlry item jpeg like a bracelette as well as other information. I
would actually upload the image jpegs for the bracelettes to a
directory using ftp or similar. The program would then build the
records from the spreadsheet and figure out which jpeg goes with which
record using the filename field However, it might mean there is no
other way to enter jewlry items using forms. Ideally it might be nice
to be able to enter the jewlry records both ways, from a spreadsheet/
ftp load or the usual way. This is not my current project, but I may
end up working on it sometime soon.