Upload via ftp

4 views
Skip to first unread message

cvk

unread,
Jan 22, 2010, 7:40:21 AM1/22/10
to Panda
I want to upload large files (> 2GB) via ftp to a panda server
(mounted EBS volume). But how do I tell Panda about the uploaded files
and encode them?

From what I've seen in the Video model, I guess I have to create a
Video object, rename the file according to the video id and move it to
the tmp folder (this is done by the ftp upoload), set the Video
object's filename property and then call the
finish_processing_and_queue_encodings method:

v = Video.create_empty
v.filename = v.key + ".mp4"
v.read_metadata
v.status = "original"
v.save
v.finish_processing_and_queue_encodings

Is this correct or do I have to keep something else in mind?


Best
Chris

Damien Tanner

unread,
Feb 3, 2010, 8:27:08 AM2/3/10
to panda...@googlegroups.com
Hi Chris,

Yes what you're doing should work, have you tested it out?

The new hosted version of Panda (in private beta, would you like an invite?) is going to support large file uploads using FTP in the near future.

Regards,
Damien Tanner Damien Tanner - Co-Founder and Director, Panda
+44 (0)20 7099 7486 - pandastream.com - @pandastream



--
You received this message because you are subscribed to the Google Groups "Panda" group.
To post to this group, send email to panda...@googlegroups.com.
To unsubscribe from this group, send email to pandastream...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pandastream?hl=en.


cvk

unread,
Feb 3, 2010, 10:26:33 AM2/3/10
to Panda
Hi Damien,

thanks for the invite, I'll take a look as soon as I got some time to
spare...

I've found a considerably easier way to smuggle my files into the
system: I added a new method that tricks the upload method into doing
the dirty work for me:

def retrieve_from_ftp
filename = params[:filename]
path = Panda::Config[:ftp_tmp_path]
params[:file] = {
:filename => filename,
:tempfile => File.new(path + filename)
}
upload
end

Seems to work fine.


Kind Regards,
Chris

Damien Tanner

unread,
Feb 3, 2010, 10:33:51 AM2/3/10
to panda...@googlegroups.com
Ah, good hack.

Hope the smuggling goes well.

Damien Tanner Damien Tanner - Co-Founder and Director, Panda
+44 (0)20 7099 7486 - pandastream.com - @pandastream


Chris

Reply all
Reply to author
Forward
0 new messages