[freeside-commits] freeside/httemplate/misc file-upload.html, 1.1, 1.2
Ivan,,,
ivan at wavetail.420.am
Thu Aug 14 04:56:09 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv9979/httemplate/misc
Modified Files:
file-upload.html
Log Message:
customer import: add progress bar & redirect to a search of the imported customers, #3475
Index: file-upload.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/file-upload.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- file-upload.html 15 Apr 2008 20:47:58 -0000 1.1
+++ file-upload.html 14 Aug 2008 11:56:06 -0000 1.2
@@ -2,7 +2,7 @@
% if ($error) {
Error: <% $error %>
% }else{
-Freeside File Upload Successful <% join(',', @filenames) %>;
+File Upload Successful <% join(',', @filenames) %>;
% }
<% include('/elements/footer.html') %>
<%init>
@@ -17,7 +17,7 @@
or $error = "invalid upload_fields";
my $fields = $1;
-my $dir = $FS::UID::conf_dir. "/cache.". $FS::UID::datasrc;
+my $dir = $FS::UID::cache_dir. "/cache.". $FS::UID::datasrc;
foreach my $field (split /,/, $fields) {
next if $error;
@@ -25,7 +25,13 @@
my $fh = $cgi->upload($field)
or $error = "No valid file was provided.";
+ my $suffix = '';
+ if ( $cgi->param($field) =~ /(\.\w+)$/i ) {
+ $suffix = lc($1);
+ }
+
my $sh = new File::Temp( TEMPLATE => 'upload.XXXXXXXX',
+ SUFFIX => $suffix,
DIR => $dir,
UNLINK => 0,
)
More information about the freeside-commits
mailing list