Hi,All:
I met a strange problem with file_column. My application worked well
before I changed my Model, I only changed the size of picture. but cause
the following problems:
No such file or directory -
D:/WORK_HOME/rails-projects/work/public/uploads/teacher/image/tmp/1222073389.593000.1264/Clayton04.JPG
or
D:/WORK_HOME/rails-projects/work/public/uploads/teacher/image/tmp/1222073389.593000.1264/Clayton04.jpg
I changed the line 210 in file_column.rb to following:
FileUtils.mv(local_file_path, new_local_file_path) unless
new_local_file_path.upcase == local_file_path.upcase
I changed the line 210 in file_column.rb to following:
FileUtils.mv(local_file_path, new_local_file_path) unless
new_local_file_path.upcase == local_file_path.upcase
I've tried that but no success.
I tried to debug and found that it want to move the temporary directory
to a new that not exist and then it bailouts. The image column is never
updated so it is allways nil.
ex:
mv app/public/object/image/tmp/unique_dir_name/ to
app/public/object/image/development/id/
The destination does not exist. I don't know what rails do in the
background but normally you can't move a dir to a dir that do not exist.
Maybe it tries to rename it but I'm sure there are restrictions also
there...?
I have worked with this for a couple of weeks now.. I never had such a
problem in my whole programming life (about 30 years).
I changed the line 210 in file_column.rb to following:
FileUtils.mv(local_file_path, new_local_file_path) unless
new_local_file_path.upcase == local_file_path.upcase
I've tried that but no success.
I tried to debug and found that it want to move the temporary directory
to a new that not exist and then it bailouts. The image column is never
updated so it is allways nil.
ex:
mv app/public/object/image/tmp/unique_dir_name/ to
app/public/object/image/development/id/
The destination does not exist. I don't know what rails do in the
background but normally you can't move a dir to a dir that do not exist.
Maybe it tries to rename it but I'm sure there are restrictions also
there...?
I have worked with this for a couple of weeks now.. I never had such a
problem in my whole programming life (about 30 years).
I'm sure it's a bug - How can I make it work
I guess the places of bugs:
1.the uploaded file name will be sanitized before move to
"app/public/object/image/development/id/", so, you can print the file
name when debuging the file_column, try to find the bugs.
2.the destination's permission.
3.get the latest version of file_column.