Displaying 20 results from an estimated 900 matches similar to: "possible file upload bug in integration test"
2006 Jun 19
3
can''t dump anonymous class Class
I''m trying to create a document upload system, where most of the code is
the super class Document and just the path to file on the system is
controlled by the sub classes. When I attempt to use my code, I get the
following when I try to save the document.
can''t dump anonymous class Class
Any ideas?
** Migration **
class CreateDocuments < ActiveRecord::Migration
def
2006 Dec 30
2
Another RSpec on Rails issue: how to test send_file()
Hi!
Today I needed to implement some controller code, that uses send_file()
to send image data. How can this be tested / specified with RSpec?
bye,
Tobias
2006 Sep 05
2
Mongrel and umask for uploaded files
So any files that are uploaded through my form are getting the following mode:
-rw-------
I need them to have:
-rw-r--r--
I''ve tried setting the umask in a script file called set_umask.rb as follows:
File.umask(022)
and then starting mongrel using:
mongrel_rails start -m config/mime.types -S set_umask.rb
but it doesn''t seem to change the mode that the files are created
2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
I submitted this earlier, but the web forums went down and I''ve screwed up
the thread, so I''m starting over.
I''m trying to built a document upload system. The system has a main
Document model with different subclasses for different types of documents.
With the code below, if I attempt to create a Document, it works fine, but
if I attempt to use one of the subclasses, I
2006 Jan 09
1
Saving an upload
I am creating a database for movies (films) and television shows (shows)
that will have has_and_belongs_to_many relationships with the pictures
table.
CREATE TABLE screenshots (
id serial NOT NULL,
filename character varying NOT NULL,
content_type character varying NOT NULL,
primary key (id)
);
CREATE TABLE films (
id serial NOT NULL,
name character varying NOT NULL,
2006 Aug 15
8
AGAIN: file object treated as string
I am trying to implement the uploading of a file to a remote server
I get error while trying to write the file on the server. The error I
get is the following:
undefined method `rewind'' for #<String:0x2aaaad062eb8>
It seems to be treating my file as a string instead of a File object.
--------- Code is below ------------------
VIEW:
<%=
2005 Sep 07
0
model constructor errors.
I have a model; I do photo = Photo.new(parameters) parameters
contains: {"picture"=>#<File:C:/DOCUME~1/BART~1/LOCALS~1/Temp/CGI3180.1>}
so i expect that the def picture=(filename) method is called in this
constructor.. this is not the case. Does anyone know why?
params[:photo].each_pair do |id, parameters|
photo = Photo.new(parameters)
end
class Photo
2003 Oct 01
1
3.7.1p2 sftp recurse patch
This patch is against OpenSSH 3.7.1p2 sources. It adds recursive
(directory) downloading and uploading. Criticism/suggestions welcome.
I would imagine the time official support is added, recursive operations
will be handled on a per-command basis as a flag as opposed to a global
toggle command (such as get -r)?
diff -ru openssh-3.7.1p2/sftp-int.c openssh-3.7.1p2-patched/sftp-int.c
---
2003 Oct 30
2
sftp client reget reput
we have implemented this function for 3.1p1, and have been using it in
production sense may 2002. The patch has been ported to 3.7.1p2, we have
been using it in 3.7.1p2 for awhile, if anyone is interested, here it is.
This is the same patch David Bradford talked about on 2002-06-05
Regards,
Greg Hayes
diff -u -r openssh-3.7.1p2/sftp-client.c openssh-3.7.1p2_sftp/sftp-client.c
---
2006 Jun 28
0
Reading email attachments
Is anyone sucessfully reading email attachments?
I have had some luck in my local dev environment but only get partial
files on my hosted server (TxD) and then only sometimes.
I use something like this....
Net::POP3.start("widespreadsolutions.com", nil, "briefcase", "y902xas")
do |pop|
if pop.mails.empty?
logger.info "NO MAIL"
else
2002 Nov 05
2
[PATCH] fix sftp to preserve permissions and uid/gid
Sftp fails to correctly preserve permissions when fetching a file. It adds
write permission for the owner (presumably so it can write the file).
Sftp also fails to preserve the uid/gid. Added code so that if is running
as root, uid and gid are preserved.
patch is based on Openssh 3.4p1.
*** sftp-client.c@@\main\1 Tue Oct 1 17:26:20 2002
--- sftp-client.c Tue Nov 5 10:22:52 2002
2012 Sep 11
1
define_method vs module_eval
Rails code:
Accessors.send :define_method, :"default_#{name}", &block
Accessors.module_eval <<-METHOD, __FILE__, __LINE__ + 1
def #{name}
-ISKimRw02aC5oVgD8gxYQQ@public.gmane.org(:#{name}, [])
end
def #{name}=(value)
value = value.present? ? Array(value) : default_#{name}
_set_detail(:#{name}, value) if value != @details[:#{name}]
end
2002 Jan 03
3
[PATCH] Improving sftp client performance
The included patch for openssh 3.0.2p1 implements overlapping read
requests for the sftp client. It should be able to handle weird cases
such as shriking files and reordered responses. This is only the first
shot, and I'd be happy for any comments. I plan to implement something
similar for the write path if this works out well.
The maximum number of outstanding requests is quite high at
2007 Nov 07
2
find_pid broken in mongrel_cluster 1.0.4
The find_pid method no longer returns a nil by default which causes
some breakage in cases where the pid can''t be found since the local
variable ''pid'' becomes the entire output of the ''ps'' command. Can you
add this return back in so that it behaves the way it did earlier?
thanks,
eric
2006 Aug 15
0
file object treated as a string
I am trying to implement the uploading of a file to a remote server
My upload form looks like this:
<%= start_form_tag(:action => "save_image", :multipart => true) %>
<td><b>Description</b> </td>
<td><%= text_area("image", "descript", "cols" => 33, "rows" => 5) %></td>
2001 Sep 10
0
[PATCH] quick hack for 'resume' support in sftp
I saw several questions regarding 'resume transfer' support in sftp come up,
in the archives, but no real satisfying answer. I had a particular itch
myself, so I scratched it with a quick hack. Patch attached, since it's not
really big.
To explain, I need to use ssh (scp or sftp) to transfer files to and from a
Windows box. No other method is available. And the Windows machine has no
2011 Mar 26
2
upload file, read first 10 lines.
I have a csv file and in my controller:
uploaded_file = params[:upload][:csv].read
@rows << FasterCSV.parse(uploaded_file)
I want to put in @rows only the first 10 lines but the read method
reads all the file.
How can I do?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Jul 26
4
Upload File
I got this error:
NoMethodError in PictureController#new
You have a nil object when you didn''t expect it!
The error occured while evaluating nil.uploaded_file=
and the line code is here:
@picture.uploaded_file = @params[''picture_file'']
--
Posted via http://www.ruby-forum.com/.
2006 May 17
2
Problem uploading files
Hi everyone,
I''m having trouble uploading some files. I''ve set up a simple action whose
view looks like:
<%= start_form_tag({:action => ''handle_file_test''}, {:multipart => true}) %>
<label for="file">File to Upload</label> <%= file_field_tag "file" %>
<%= submit_tag %>
<%= end_form_tag %>
2019 May 07
0
dlopen failed: cannot locate symbol "opus_projection_encoder_ctl" referenced by "libopusenc.so"
Hi Opus Experts,
I am working on a JNI library which depends on libopusenc which in turn depends on libopus. However, during runtime, I encountered a linking error while loading the library:
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "opus_projection_encoder_ctl" referenced by "libopusenc.so"
Here is how to reproduce the issue:
Build procedure