Revision 4916
Added by walbridge over 15 years ago
register-dataset.cgi | ||
---|---|---|
3846 | 3846 |
debug("Processing file: $fn"); |
3847 | 3847 |
# Upload the file object itself to a temporary file, copy file metadata to form |
3848 | 3848 |
my $fileInfo = processFile($fileName); |
3849 |
# if we have existing uploads, increment the counter to avoid overwriting |
|
3850 |
my $totalFileNum = $fileNum + $FORM::upCount; |
|
3851 |
$$templateVars{"upload_$totalFileNum"} = $fileInfo->{'fileHash'}; |
|
3852 |
$$templateVars{"uploadname_$totalFileNum"} = $fileInfo->{'fileName'}; |
|
3853 |
$$templateVars{"uploadtype_$totalFileNum"} = $fileInfo->{'contentType'}; |
|
3854 |
$$templateVars{"uploadperm_$totalFileNum"} = param("uploadperm_$fileNum"); |
|
3849 |
$$templateVars{"upload_$fileNum"} = $fileInfo->{'fileHash'}; |
|
3850 |
$$templateVars{"uploadname_$fileNum"} = $fileInfo->{'fileName'}; |
|
3851 |
$$templateVars{"uploadtype_$fileNum"} = $fileInfo->{'contentType'}; |
|
3852 |
$$templateVars{"uploadperm_$fileNum"} = param("uploadperm_$fileNum"); |
|
3855 | 3853 |
$uploadCount++; |
3856 | 3854 |
} |
3857 | 3855 |
} |
Also available in: Unified diff
Further fixes to handle mixed-file uploads:
- set the fileCount object based on upCount existing files
- use ucount only if it exists; remove debugging'
- the entry form javascript now correctly tracks the file numbers, and can be relied on instead of using upCount
Cosmetic:
- fix large boxes appearing around new keywords / associated parties / taxons by forcing them to use corrected style
k
M lib/style/common/templates/entryForm.js
M src/perl/register-dataset.cgi