01-24-2020
Way to go Ravinder and Victor! You deserve it
These 4 Users Gave Thanks to balajesuri For This Post:
8 More Discussions You Might Find Interesting
1. What is on Your Mind?
On this special Happy News Year day, 1 January 2019, I am pleased to promote Ravinder Singh to UNIX.COM Moderator, for at least the following reasons:
Ravinder Loves UNIX.COM
Ravinder has 1,372 Thanks, which puts him in the Top Ten in that important single category.
Ravinder is one of... (8 Replies)
Discussion started by: Neo
8 Replies
2. What is on Your Mind?
Congrats to Ravinder Singh for his new Green Web Dev Ops badge.
Everyone starts to learn and grown in technology and Ravinder is starting to learn Web Dev and is making progress quickly.
https://www.unix.com/members/1-albums215-picture1010.png (6 Replies)
Discussion started by: Neo
6 Replies
3. What is on Your Mind?
This is mainly for Corona688, today's date 18-09-2019.
Remember from little acorns big trees grow a few months ago?
Well this is well on the way to 1000+ dls by the end of the year...
AMINET from its inception in 1992 is accessed by very, very many and the AMIGA is still loved by millions.
... (1 Reply)
Discussion started by: wisecracker
1 Replies
4. What is on Your Mind?
Dear All,
I am pleased to post that I am announcing a new award, "Poster of the Year 2019" and calling for your nominations (privately to me).
This is a new award and I plan to announce the winner for this year (2019) in January 2020. The prizes will be (still working out the details):
... (0 Replies)
Discussion started by: Neo
0 Replies
5. What is on Your Mind?
Here is a quick EOY report for 2019.
2019 has been a year of "downward trend reversal" for UNIX.com. In fact, if we compare total Google search impressions from the peak days in December 2019 to the peak days in mid December 2018, traffic is up 43% percent. That is a very respectable growth... (0 Replies)
Discussion started by: Neo
0 Replies
6. What is on Your Mind?
Dear All,
We are happy to post that I will be announcing soon my award for "Moderator of the Year 2019". This is a new award which I plan to announce in December of each year, starting this year (2019). The prizes will be (still working out the details):
A Moderator of the Year... (3 Replies)
Discussion started by: Neo
3 Replies
7. What is on Your Mind?
Today, I am very pleased to announce the Poster of the Year Award, 2019 is Jeroen van Dijke (Scrutinizer)
Jeroen has been a member of unix.com just over 11 years (He first joined unix.com in November 2008) and has been a very valuable, reliable and thoughtful resource for countless people over... (3 Replies)
Discussion started by: Neo
3 Replies
8. What is on Your Mind?
You are seeing this new video here first!
Top Five Cybersecurity Threats | Earth Year 2019 | You Have Been Warned!
https://youtu.be/dRE4u9QVsSg
PS: That video has two small typos, but nothing serious. Heck it took nearly 1.5 hours to render even on a 12-core Mac Pro with 64GB of... (20 Replies)
Discussion started by: Neo
20 Replies
LEARN ABOUT MOJAVE
dbix::class::inflatecolumn::file
DBIx::Class::InflateColumn::File(3) User Contributed Perl Documentation DBIx::Class::InflateColumn::File(3)
NAME
DBIx::Class::InflateColumn::File - DEPRECATED (superseded by DBIx::Class::InflateColumn::FS)
Deprecation Notice
This component has a number of architectural deficiencies that can quickly
drive your filesystem and database out of sync and is not recommended for
further use. It will be retained for backwards compatibility, but no new
functionality patches will be accepted. Please consider using the much more
mature and actively supported DBIx::Class::InflateColumn::FS. You can set
the environment variable DBIC_IC_FILE_NOWARN to a true value to disable
this warning.
SYNOPSIS
In your DBIx::Class table class:
use base 'DBIx::Class::Core';
__PACKAGE__->load_components(qw/InflateColumn::File/);
# define your columns
__PACKAGE__->add_columns(
"id",
{
data_type => "integer",
is_auto_increment => 1,
is_nullable => 0,
size => 4,
},
"filename",
{
data_type => "varchar",
is_file_column => 1,
file_column_path =>'/tmp/uploaded_files',
# or for a Catalyst application
# file_column_path => MyApp->path_to('root','static','files'),
default_value => undef,
is_nullable => 1,
size => 255,
},
);
In your Catalyst::Controller class:
FileColumn requires a hash that contains IO::File as handle and the file's name as name.
my $entry = $c->model('MyAppDB::Articles')->create({
subject => 'blah',
filename => {
handle => $c->req->upload('myupload')->fh,
filename => $c->req->upload('myupload')->basename
},
body => '....'
});
$c->stash->{entry}=$entry;
And Place the following in your TT template
Article Subject: [% entry.subject %]
Uploaded File:
<a href="/static/files/[% entry.id %]/[% entry.filename.filename %]">File</a>
Body: [% entry.body %]
The file will be stored on the filesystem for later retrieval. Calling delete on your resultset will delete the file from the filesystem.
Retrevial of the record automatically inflates the column back to the set hash with the IO::File handle and filename.
DESCRIPTION
InflateColumn::File
METHODS
_file_column_callback ($file,$ret,$target)
Method made to be overridden for callback purposes.
AUTHOR
Victor Igumnov
LICENSE
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.18.2 2013-09-24 DBIx::Class::InflateColumn::File(3)