Hi everyone,
OK, so I've got an app together, deployed on a Joyent Accelerator, and realized that whenever I redeploy changes I've made, subversion goes ahead and gets rid of everything in the images/users directory (images uploaded by users are thrown in there within trees and trees of categorical directories.) That's understandable, I expect that to happen now that I think about it.
What I would like to do now is save those images in a subdirectory or something which is not associated with the app, for instance, http://images.myserver.com.
Right now, I'm writing the file as such:
Code Ruby:@dir = "#{RAILS_ROOT}/public/images/users/#{@substring_dir}/#{@user.screen_name}/#{@classified.id}" File.makedirs @dir
Then the file is saved in that new directory, which would be something like this: "http://myserver.com/images/users/u/s/e/user1/coolimage.jpg"
I would like it to be: "http://images.myserver.com/users/u/s/e/user1/coolimage.jpg"
I'm assuming the subdirectory won't be associated with the app, so I can update the app with subversion to my heart's content and those files in the image subdirectory won't be affected. Not like I know how to even create subdirectories yet, but I suppose that's something for another forum![]()
Thanks in advance!







Bookmarks