Start with the archive upload functionality (sponsored by Scilab);

add a new view and plain form to upload an archive; rename the internal
URLs, handlers and templates from submit to create for single downloads
and also add a help section about the new format as well as a detailed
FAQ entry. Archive files get a bigger upload limit (default: 20MB).

Next up: archive uploading, validation and processing.
This commit is contained in:
Thomas Keller
2011-11-02 00:15:33 +01:00
parent 34fbf6ec5f
commit c71ed2cecb
11 changed files with 404 additions and 10 deletions

View File

@@ -495,6 +495,11 @@ $cfg['idf_strong_key_check'] = false;
# always have precedence.
# $cfg['max_upload_size'] = 2097152; // Size in bytes
# If a download archive is uploaded, the size of the archive is limited to 20MB.
# The php.ini upload_max_filesize and post_max_size configuration setting will
# always have precedence.
# $cfg['max_upload_archive_size'] = 20971520; // Size in bytes
# Older versions of Indefero submitted a POST request to a configured
# post-commit web hook when new revisions arrived, whereas a PUT request
# would have been more appropriate. Also, the payload's HMAC digest was

View File

@@ -304,6 +304,11 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/page/(.*)/$#',
// ---------- Downloads ------------------------------------
$ctl[] = array('regex' => '#^/help/archive-format/$#',
'base' => $base,
'model' => 'IDF_Views',
'method' => 'faqArchiveFormat');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/$#',
'base' => $base,
'model' => 'IDF_Views_Download',
@@ -332,7 +337,12 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/(\d+)/get/$#',
$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/create/$#',
'base' => $base,
'model' => 'IDF_Views_Download',
'method' => 'submit');
'method' => 'create');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/create/archive/$#',
'base' => $base,
'model' => 'IDF_Views_Download',
'method' => 'createFromArchive');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/(\d+)/delete/$#',
'base' => $base,