Attachment_FU -- stops creating after first file creation


#1

I’m using attachment_fu for award nomination site and I’m running into
a very strange problem that I’ve found absolutely zero information on.
When running on our remote server (redhat fedora), I can only upload
one file. After the classname/0000/0002 or whatever directory gets
created once and the file is upload and written, I cannot seem to
write to that directory ever again without deleting it. I don’t get an
error. I just get returned to the controller index with no uploaded
data any time I try to write. The original file that was there remains
intact and working until I destroy it (which works). Even after
destroying it, I can’t create a new file.

Interestingly enough, I don’t have this problem at all when running on
my local servers (two different macs). Only on the remote server.

Any help, suggestions, links, or just pointing in the right direction
is most appreciated.


#2

The theory at the moment is that when attachment_fu creates the
classname/0000/0002 directory structure, it perhaps checks to see if
it exists first. When it sees that classname/ already exists, the
process stops for some reason. Does anyone know where I can find the
bit of code in attachment_fu that might decide this?


#3

http://bs.techno-weenie.net/!source/2920/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb#36


#4

Thanks for the link, Isaac. It’s definitely putting me on the right
path. Thing is… I’m having a really hard time discerning what
exactly it is that this code is doing. Would anyone care to parse some
of the logic and syntax for me? I’d greatly appreciate it.