# File\_column repository broken?

**URL:** <https://www.ruby-forum.com/t/file-column-repository-broken/97565>\
**Category:** Rails\
**Created:** [July 7, 2006, 11:58pm UTC](https://www.ruby-forum.com/t/file-column-repository-broken/97565 "2006-07-07T23:58:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![thekog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3da27b/32.png) [@thekog](https://www.ruby-forum.com/u/thekog)\
**Post date:** [July 7, 2006, 11:58pm UTC](https://www.ruby-forum.com/t/file-column-repository-broken/97565/1 "2006-07-07T23:58:23Z")

</div>

I really want to try out file\_column but the repository seems to be down  
for me. I added it to my repository list and script/plugin is unable to  
see anything in it.

I downloaded an archive from the website but it is not clear to me which  
files need to be installed to which subdirs of my RoR project.

Anyone else having this issue with the repository? I am able to see  
other repositorys no problem.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![thekog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3da27b/32.png) [@thekog](https://www.ruby-forum.com/u/thekog)\
**Post date:** [July 8, 2006, 1:30am UTC](https://www.ruby-forum.com/t/file-column-repository-broken/97565/2 "2006-07-08T01:30:36Z")

</div>

On 7/7/06, Mike K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks in advance.
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

The repo is hosted on a free SVN service, which is also down. No idea  
why. You can download my version of file\_column, which differs from  
the main one (mostly by using `mogrify ... ` instead of RMagick) in  
undocumented ways.

[http://svn.kylemaxwell.com/file\_column/](http://svn.kylemaxwell.com/file_column/)

–  
Kyle M.  
Chief Technologist  
E Factor Media // FN Interactive  
removed\_email\_address@domain.invalid  
1-866-263-3261

---

<div class="post-metadata">

**Author:** ![thekog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3da27b/32.png) [@thekog](https://www.ruby-forum.com/u/thekog)\
**Post date:** [July 8, 2006, 2:47am UTC](https://www.ruby-forum.com/t/file-column-repository-broken/97565/3 "2006-07-08T02:47:38Z")

</div>

On Fri, 2006-07-07 at 19:29 -0400, Kyle M. wrote:

> > Thanks in advance.

> The repo is hosted on a free SVN service, which is also down. No idea  
> why. You can download my version of file\_column, which differs from  
> the main one (mostly by using `mogrify ... ` instead of RMagick) in  
> undocumented ways.
> 
> [http://svn.kylemaxwell.com/file\_column/](http://svn.kylemaxwell.com/file_column/)

* * *

speaking of file\_column (and not wishing to steal this thread)…

I set it up and am running it on Linux and when I plug my SD memory  
card, the files are all lower case and file\_column/rmagic do their thing  
and the file name remains all lower case. When I went to my client’s  
office and stuck the same SD card into their Macintosh, the picture file  
names were all upper case and the files transferred by  
file\_column/rmagic were all upper case which is a pita with view code  
manipulation because I now have to accommodate any scenario.

Has anyone come up with a better fix than view code?

Craig

---

<div class="post-metadata">

**Author:** ![thekog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3da27b/32.png) [@thekog](https://www.ruby-forum.com/u/thekog)\
**Post date:** [July 8, 2006, 3:29am UTC](https://www.ruby-forum.com/t/file-column-repository-broken/97565/4 "2006-07-08T03:29:06Z")

</div>

Thanks, I grabbed the archive, figured out how to manually install, and  
am now running. Apprciate you confirming the server is down. Now I need  
to figure out how to update a file for a given record.

For example if I have a field called image in Entry, and the user has  
already uploaded an image file, I want to enable the user to replace the  
file when he edits the record.

Perhaps I need to do a before\_update callback in Entry, and compare the  
tmp uploaded file to the one in the database, and if different delete  
the file and allow the new one to be placed in the filesystem and on the  
db?

Anyone done this?

---

<div class="post-metadata">

**Author:** ![thekog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3da27b/32.png) [@thekog](https://www.ruby-forum.com/u/thekog)\
**Post date:** [July 8, 2006, 2:56am UTC](https://www.ruby-forum.com/t/file-column-repository-broken/97565/5 "2006-07-08T02:56:55Z")

</div>

> I set it up and am running it on Linux and when I plug my SD memory  
> card, the files are all lower case and file\_column/rmagic do their thing  
> and the file name remains all lower case. When I went to my client’s  
> office and stuck the same SD card into their Macintosh, the picture file  
> names were all upper case and the files transferred by  
> file\_column/rmagic were all upper case which is a pita with view code  
> manipulation because I now have to accommodate any scenario.

Look towards the end of lib/file\_column.rb for

def self.sanitize\_filename …

–  
Kyle M.  
Chief Technologist  
E Factor Media // FN Interactive  
removed\_email\_address@domain.invalid  
1-866-263-3261

---

<div class="post-metadata">

**Author:** ![thekog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3da27b/32.png) [@thekog](https://www.ruby-forum.com/u/thekog)\
**Post date:** [July 8, 2006, 3:29am UTC](https://www.ruby-forum.com/t/file-column-repository-broken/97565/6 "2006-07-08T03:29:39Z")

</div>

Thanks, I grabbed the archive, figured out how to manually install, and  
am now running. Apprciate you confirming the server is down. Now I need  
to figure out how to update a file for a given record.

For example if I have a field called image in Entry, and the user has  
already uploaded an image file, I want to enable the user to replace the  
file when he edits the record.

Perhaps I need to do a before\_update callback in Entry, and compare the  
tmp uploaded file to the one in the database, and if different delete  
the file and allow the new one to be placed in the filesystem and on the  
db?

Very similar to allowing a user to update his avatar image and only  
enbaling him to have 1 image stored at a time.

Anyone done this?

---

<div class="post-metadata">

**Author:** ![thekog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3da27b/32.png) [@thekog](https://www.ruby-forum.com/u/thekog)\
**Post date:** [July 8, 2006, 3:39am UTC](https://www.ruby-forum.com/t/file-column-repository-broken/97565/7 "2006-07-08T03:39:40Z")

</div>

On Fri, 2006-07-07 at 20:54 -0400, Kyle M. wrote:

> def self.sanitize\_filename …

* * *

sort of like, add

filename = filename.downcase

just before it returns filename ?

That should work

I wasn’t going to hack the code if there was something I missed but this  
should suffice

Thanks

Craig

---

<div class="post-metadata">

**Author:** ![thekog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3da27b/32.png) [@thekog](https://www.ruby-forum.com/u/thekog)\
**Post date:** [July 8, 2006, 3:39am UTC](https://www.ruby-forum.com/t/file-column-repository-broken/97565/8 "2006-07-08T03:39:57Z")

</div>

On 7/7/06, Kyle M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> def self.sanitize\_filename …

I had a problem with file\_column under OS X also and had to modify the  
source to get it to work with mixed case / upper case file names.  
Here’s a link to the solution (and the thread discussing it):

[http://www.devlists.com/message/35524](http://www.devlists.com/message/35524)

jt
