similar to: Showing images secure way

Displaying 20 results from an estimated 2000 matches similar to: "Showing images secure way"

2005 Dec 14
3
image upload (apache2.0+ lighttpd)
Hello all, I use lighttpd 1.4.8 and I have a problem with image uploads. I tried file_upload plugin, but it is strangely working sometimes and refuse to work sometimes. Function in the controller is (@user is loaded in before_filter) def update_watermark @user.watermark = params[:user][:watermark] @user.save redirect_to :action => "index" end Model is
2006 Jun 23
2
polymorphic challenge
Hello All, I have a little challenge and I am not sure if this is even possible I am working on a dating/event site and few functionalities are similar that I want to centralize them. We have users which can have - favorite users - interest list - blocked users All these relations are like; User <-> Relation <-> User I was thinking I could have a class called Relation (with a
2006 Jan 10
3
Serving lots of images to only registred users
Hello guys, I am building a photo website and I have some questions before I really start programming the site. My system will be Debian + lighttpd + mysql +fastcgi + ImageMagick I plan to use file_column for image handling/verification and thumbnail creation. My question is; I need to store images in a place outside of webroot so only registered members can see them. To serve them secure
2006 Jun 18
10
acts_as_enumerated
Hello All, Any one using acts_as_enumerated? I need help using (I like that it caches values in memory) I am working on a dating website and there are lots of options I want to store as enumerated like Status; divorce, single, Sex: male, female Eye color; blue, brown, green.... and lots more.... But I do not wanna keep them in seperate tables, and wanna keep them all together. Anyone has a
2006 Mar 22
5
foreach item in column
Hi there, I have a database with phonenumbers, and I want to make a function that runs a command for each of these numbers, with the number as an argument Something like this in Perl: system("/bin/command $number"); mysql> select * from numbers where list = "one" +----+----------+----------+---------------------+-----------+ | id | number | name | email
2006 Apr 25
3
limiting options in file_upload
Does anyone know if it''s possible to set constraints to the size & type of file that file_column will accept? I''d like to limit to image files of less than 2MB. If this isn''t possible with file_column, is there a graceful way of getting the controller to handle it? thanks dorian -- -- I do things for love or money
2006 Jan 19
4
validates_presence_of
I am just going through the book and I come across a problem with the code in the app/models: validates_format_of :image_url, :with => %r{^http:.+\.(gif|jpg|png)$}i, :message => "must be a URL for a GIF, JPG, or PNG image" It seems to moan when it''s empty even though I removed :image_url from validates_presence_of. How should I make it optional?
2006 Jan 26
4
Override has_many :order at run-time?
Is it possible to override has_many''s :order attribute at run-time? e.g. something like: <% for category in @site.categories(:order=>''name'') %> ... <% for category in @site.categories(:order=>''rank'') %> ... thanks csn -- Posted via http://www.ruby-forum.com/.
2006 Jan 20
8
validates_confirmation_of not working
is there any special requirement for validates_confirmation_of ? I am trying to make sure 2 passwords are equal (cleanly the rails way).. In my view i have two fields with id user[password] and user[password_confirmation]. in the model i have validates_confirmation_of :password, :message =>"Passwords do not match " Am i missing something here ? thanks adam
2006 Apr 01
4
Saving images in shared directory w/ Capistrano/SVN?
Hi all, I''m using Capistrano and SVN to version control and deploy, but I''m not sure what to do about my images directory. I use file_column and RMagick to save images to the disk under a model called "Image", and they''re saved in public/image/... etc. Each time I deploy a new version, my image folder doesn''t exist anymore. I don''t want
2010 Jun 24
2
Euclidean Distance Matrix Analysis (EDMA) in R?
I am studying on statistical shape analysis, I wonder is there any way or package available that I can perform Euclidean Distance Matrix Analysis (EDMA I or EDMA II) in R... thanks Gokhan -- View this message in context: http://r.789695.n4.nabble.com/Euclidean-Distance-Matrix-Analysis-EDMA-in-R-tp2266797p2266797.html Sent from the R help mailing list archive at Nabble.com.
2007 May 02
1
problem in: img_options["size"] = img_size
hi guys, I have show_image problem. I have the following code in application_helper.rb in my rails project def show_image(src,img_size) img_options = { "src" => src.include?("/") ? src : "/images/#{src}" } img_options["src"] = img_options["src"] + ".gif" unless img_options["src"].include?(".")
2006 Jun 07
2
Qick Q: Expression in this Controller
I tried putting this inside my controller: def goodbye @link = Link_to "goodbye!", :action =>"goodbye" end and display it in my views calling the @link variable. Of course it doesn''t work. Why? Thanks -- Posted via http://www.ruby-forum.com/.
2006 Mar 22
3
Problems with validates_presence_of...anybody?
Hello everybody, I have been developing small applications in Rails from quite some time. But lately, I came across a bug which I have not been able to correct. If anybody could help me with it, would be of great help thankyou. Actually, the problem is that I have a form in my application with some set of fields. Now what "validates_presence_of" should do is that if I submit the form
2006 Apr 30
4
Subversion and Capistrano
I have a project under Subversion, deployed by Capistrano. When it is deployed, obviously I need to deploy "real" copies of database.yml, deploy.rb, and maybe a couple of other files. But if I offer it for public checkout, I obviously do not want these files as part of the checked out code. What''s the best way to handle this? --Al Evans -- Posted via
2006 Jul 18
0
another 2 newbie questions
Hey all, Ok I have three tables: Images(id,name,dirid) #dirid is a foreign key to Album.url, the path to the image Albums(id,url) Tags(id,name) ImagesTags(image_id,tag_id) I have a HABTM relation for tags and images and a belongs_to/has_many relation for albums and images. Now in my views/tag/show.rhtml I have this: <% for album in @albums %> <% for image in @images %> <% if
2007 Jan 09
0
Production Mode with SCGI
Hi, I have an application running on Apache SCGI (Win XP). Once I run it in production mode (scgi_ctrl config -S -e production ) I''m getting stack trace instead of HTTP status 500 (Application Error) and the error is logged production.log. The application works fine without SCGI. Your help is highly appreciated.... Thanx /* production.log */ # Logfile created on Thu Jan 04 16:35:43
2006 Mar 07
0
production.log says status 200, browser says 500?
I have a long running operation (more than a minute) that is running in a request. The operation completes according to the log and the log says that it returns http status 200. Sometimes an error message is written after the 200 log message (included at the end of this message). But the browser get a status 500 from the Apache server. We''re using Apache with SCGI on Windows doing
2005 Nov 15
11
Collecting thread: Too many open files (Rails+SCGI crash)
I have a problem with running Rails 0.13.1 with scgi_rails 0.4.3 and Apache. After running for some time (more than a day), the SCGI process stops with the following error (from scgi.log): -- [ERR][24189] Collecting thread: Too many open files [ERR][24189] /usr/local/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:188:in `accept''
2006 Mar 31
2
AAARGH! Need some fresh eyes to look at this pls
I just switched my rails app over to production mode, couldn''t get it working, switched it back to development mode, and now nothing gets outputted in the browser. I''m sure I''ve missed something in the configs. Setup: Lighttpd/SCGI on WinXP, Rails 1.0. Environment.rb: ENV[''RAILS_ENV''] ||= ''development'' require