Skip to content

Commit 6018081

Browse files
Adam HopkinsAdam Hopkins
authored andcommitted
Added size function for file size
1 parent c597d21 commit 6018081

File tree

9 files changed

+48
-11
lines changed

9 files changed

+48
-11
lines changed

Changes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,9 @@ Revision history for jQuery-File-Upload
9696
0.23
9797

9898
Updated delete response for new expected JSON
99+
100+
0.24
101+
102+
103+
0.25
104+
added size function for file size

MYMETA.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@
4646
}
4747
},
4848
"release_status" : "stable",
49-
"version" : "0.24"
49+
"version" : "0.25"
5050
}

MYMETA.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ requires:
2828
Net::SSH2::SFTP: '0'
2929
URI: '0'
3030
perl: '5.006'
31-
version: '0.24'
31+
version: '0.25'

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ DIRFILESEP = /
6262
DFSEP = $(DIRFILESEP)
6363
NAME = jQuery::File::Upload
6464
NAME_SYM = jQuery_File_Upload
65-
VERSION = 0.24
65+
VERSION = 0.25
6666
VERSION_MACRO = VERSION
67-
VERSION_SYM = 0_24
67+
VERSION_SYM = 0_25
6868
DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
69-
XS_VERSION = 0.24
69+
XS_VERSION = 0.25
7070
XS_VERSION_MACRO = XS_VERSION
7171
XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
7272
INST_ARCHLIB = blib/arch
@@ -262,7 +262,7 @@ RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
262262
DIST_CP = best
263263
DIST_DEFAULT = tardist
264264
DISTNAME = jQuery-File-Upload
265-
DISTVNAME = jQuery-File-Upload-0.24
265+
DISTVNAME = jQuery-File-Upload-0.25
266266

267267

268268
# --- MakeMaker macro section:
@@ -514,7 +514,7 @@ metafile : create_distdir
514514
$(NOECHO) $(ECHO) ' Net::SSH2::SFTP: '\''0'\''' >> META_new.yml
515515
$(NOECHO) $(ECHO) ' URI: '\''0'\''' >> META_new.yml
516516
$(NOECHO) $(ECHO) ' perl: '\''5.006'\''' >> META_new.yml
517-
$(NOECHO) $(ECHO) 'version: '\''0.24'\''' >> META_new.yml
517+
$(NOECHO) $(ECHO) 'version: '\''0.25'\''' >> META_new.yml
518518
-$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
519519
$(NOECHO) $(ECHO) Generating META.json
520520
$(NOECHO) $(ECHO) '{' > META_new.json
@@ -565,7 +565,7 @@ metafile : create_distdir
565565
$(NOECHO) $(ECHO) ' }' >> META_new.json
566566
$(NOECHO) $(ECHO) ' },' >> META_new.json
567567
$(NOECHO) $(ECHO) ' "release_status" : "stable",' >> META_new.json
568-
$(NOECHO) $(ECHO) ' "version" : "0.24"' >> META_new.json
568+
$(NOECHO) $(ECHO) ' "version" : "0.25"' >> META_new.json
569569
$(NOECHO) $(ECHO) '}' >> META_new.json
570570
-$(NOECHO) $(MV) META_new.json $(DISTVNAME)/META.json
571571

blib/lib/jQuery/File/Upload.pm

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use URI;
1717
#use LWP::UserAgent;
1818
#use LWP::Protocol::https;
1919

20-
our $VERSION = '0.24';
20+
our $VERSION = '0.25';
2121

2222
my %errors = (
2323
'_validate_max_file_size' => 'File is too big',
@@ -652,6 +652,7 @@ sub output { shift->{output} }
652652
sub url { shift->{url} }
653653
sub thumbnail_url { shift->{thumbnail_url} }
654654
sub is_image { shift->{is_image} }
655+
sub size { shift->{file_size} }
655656

656657
#OTHER METHODS
657658
sub print_response {
@@ -2375,6 +2376,15 @@ Returns whether or not the uploaded file was an image.
23752376
This should be called after handle_request or in
23762377
L<post_post|/"post_post">.
23772378
2379+
=head3 size
2380+
2381+
my $size = $j_fu->size;
2382+
2383+
Returns the size of the uploaded file.
2384+
This should be called after handle_request or in
2385+
L<post_post|/"post_post">.
2386+
2387+
23782388
=head2 OTHER METHODS
23792389
23802390
=head3 print_response

blib/man3/jQuery::File::Upload.3pm

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
.\" ========================================================================
125125
.\"
126126
.IX Title "jQuery::File::Upload 3"
127-
.TH jQuery::File::Upload 3 "2014-07-04" "perl v5.16.2" "User Contributed Perl Documentation"
127+
.TH jQuery::File::Upload 3 "2014-07-12" "perl v5.16.2" "User Contributed Perl Documentation"
128128
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
129129
.\" way too many mistakes in technical documents.
130130
.if n .ad l
@@ -1008,6 +1008,17 @@ This returns the resulting thumbnail url of the image.
10081008
Returns whether or not the uploaded file was an image.
10091009
This should be called after handle_request or in
10101010
post_post.
1011+
.PP
1012+
\fIsize\fR
1013+
.IX Subsection "size"
1014+
.PP
1015+
.Vb 1
1016+
\& my $size = $j_fu\->size;
1017+
.Ve
1018+
.PP
1019+
Returns the size of the uploaded file.
1020+
This should be called after handle_request or in
1021+
post_post.
10111022
.SS "\s-1OTHER\s0 \s-1METHODS\s0"
10121023
.IX Subsection "OTHER METHODS"
10131024
\fIprint_response\fR

jQuery-File-Upload-0.24.tar.gz

-20.1 KB
Binary file not shown.

jQuery-File-Upload-0.25.tar.gz

20.1 KB
Binary file not shown.

lib/jQuery/File/Upload.pm

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use URI;
1717
#use LWP::UserAgent;
1818
#use LWP::Protocol::https;
1919

20-
our $VERSION = '0.24';
20+
our $VERSION = '0.25';
2121

2222
my %errors = (
2323
'_validate_max_file_size' => 'File is too big',
@@ -652,6 +652,7 @@ sub output { shift->{output} }
652652
sub url { shift->{url} }
653653
sub thumbnail_url { shift->{thumbnail_url} }
654654
sub is_image { shift->{is_image} }
655+
sub size { shift->{file_size} }
655656

656657
#OTHER METHODS
657658
sub print_response {
@@ -2375,6 +2376,15 @@ Returns whether or not the uploaded file was an image.
23752376
This should be called after handle_request or in
23762377
L<post_post|/"post_post">.
23772378
2379+
=head3 size
2380+
2381+
my $size = $j_fu->size;
2382+
2383+
Returns the size of the uploaded file.
2384+
This should be called after handle_request or in
2385+
L<post_post|/"post_post">.
2386+
2387+
23782388
=head2 OTHER METHODS
23792389
23802390
=head3 print_response

0 commit comments

Comments
 (0)