aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/lib/api.php14
-rw-r--r--core/css/icons.css4
-rw-r--r--core/img/actions/checkmark-white.pngbin0 -> 286 bytes
-rw-r--r--core/img/actions/checkmark-white.svg4
-rw-r--r--lib/private/helper.php3
-rw-r--r--lib/private/mimetypes.list.php122
6 files changed, 75 insertions, 72 deletions
diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php
index cb3d3e42c34..f828a4e840d 100644
--- a/apps/files_sharing/lib/api.php
+++ b/apps/files_sharing/lib/api.php
@@ -220,9 +220,7 @@ class Api {
$shareWith = isset($_POST['password']) ? $_POST['password'] : null;
//check public link share
$publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');
- $encryptionEnabled = \OC_App::isEnabled('files_encryption');
- if(isset($_POST['publicUpload']) &&
- ($encryptionEnabled || $publicUploadEnabled !== 'yes')) {
+ if(isset($_POST['publicUpload']) && $publicUploadEnabled !== 'yes') {
return new \OC_OCS_Result(null, 403, "public upload disabled by the administrator");
}
$publicUpload = isset($_POST['publicUpload']) ? $_POST['publicUpload'] : 'false';
@@ -321,11 +319,8 @@ class Api {
$permissions = isset($params['_put']['permissions']) ? (int)$params['_put']['permissions'] : null;
$publicUploadStatus = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');
- $encryptionEnabled = \OC_App::isEnabled('files_encryption');
- $publicUploadEnabled = false;
- if(!$encryptionEnabled && $publicUploadStatus === 'yes') {
- $publicUploadEnabled = true;
- }
+ $publicUploadEnabled = ($publicUploadStatus === 'yes') ? true : false;
+
// only change permissions for public shares if public upload is enabled
// and we want to set permissions to 1 (read only) or 7 (allow upload)
@@ -363,8 +358,7 @@ class Api {
private static function updatePublicUpload($share, $params) {
$publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');
- $encryptionEnabled = \OC_App::isEnabled('files_encryption');
- if($encryptionEnabled || $publicUploadEnabled !== 'yes') {
+ if($publicUploadEnabled !== 'yes') {
return new \OC_OCS_Result(null, 403, "public upload disabled by the administrator");
}
diff --git a/core/css/icons.css b/core/css/icons.css
index 57c37c5c51c..2dc35084122 100644
--- a/core/css/icons.css
+++ b/core/css/icons.css
@@ -47,6 +47,10 @@
background-image: url('../img/actions/checkmark.svg');
}
+.icon-checkmark-white {
+ background-image: url('../img/actions/checkmark-white.svg');
+}
+
.icon-clock {
background-image: url('../img/actions/clock.svg');
}
diff --git a/core/img/actions/checkmark-white.png b/core/img/actions/checkmark-white.png
new file mode 100644
index 00000000000..08b8783649f
--- /dev/null
+++ b/core/img/actions/checkmark-white.png
Binary files differ
diff --git a/core/img/actions/checkmark-white.svg b/core/img/actions/checkmark-white.svg
new file mode 100644
index 00000000000..5e8fe8abccc
--- /dev/null
+++ b/core/img/actions/checkmark-white.svg
@@ -0,0 +1,4 @@
+<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" version="1.1" xml:space="preserve" height="16px" viewBox="-0.5 -0.5 16 16" width="16px" enable-background="new -0.5 -0.5 16 16" y="0px" x="0px" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" overflow="visible"><metadata><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><defs>
+</defs>
+<path fill="#ffffff" d="M12.438,3.6875c-0.363,0-0.726,0.1314-1,0.4063l-4.5005,4.5-1.9687-2c-0.5498-0.5484-1.4489-0.5498-2,0l-0.5,0.5c-0.5512,0.5496-0.5512,1.4502,0,2l2.9687,2.9682c0.0063,0.007-0.0065,0.025,0,0.032l0.5,0.5c0.5497,0.55,1.4503,0.55,2,0l0.5-0.5,0.1875-0.219,5.313-5.2812c0.549-0.5498,0.549-1.4503,0-2l-0.5-0.5c-0.275-0.2749-0.638-0.4063-1-0.4063z" transform="translate(-0.5,-0.5)"/>
+</svg>
diff --git a/lib/private/helper.php b/lib/private/helper.php
index 1c8d01c141f..58bee9c6300 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -161,6 +161,7 @@ class OC_Helper {
'application/vnd.oasis.opendocument.text-template' => 'x-office/document',
'application/vnd.oasis.opendocument.text-web' => 'x-office/document',
'application/vnd.oasis.opendocument.text-master' => 'x-office/document',
+ 'application/mspowerpoint' => 'x-office/presentation',
'application/vnd.ms-powerpoint' => 'x-office/presentation',
'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'x-office/presentation',
'application/vnd.openxmlformats-officedocument.presentationml.template' => 'x-office/presentation',
@@ -171,6 +172,7 @@ class OC_Helper {
'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'x-office/presentation',
'application/vnd.oasis.opendocument.presentation' => 'x-office/presentation',
'application/vnd.oasis.opendocument.presentation-template' => 'x-office/presentation',
+ 'application/msexcel' => 'x-office/spreadsheet',
'application/vnd.ms-excel' => 'x-office/spreadsheet',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'x-office/spreadsheet',
'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'x-office/spreadsheet',
@@ -180,6 +182,7 @@ class OC_Helper {
'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet',
'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet',
'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet',
+ 'application/msaccess' => 'database',
);
if (isset($alias[$mimetype])) {
diff --git a/lib/private/mimetypes.list.php b/lib/private/mimetypes.list.php
index 08228336966..40fb1d2d97d 100644
--- a/lib/private/mimetypes.list.php
+++ b/lib/private/mimetypes.list.php
@@ -21,93 +21,91 @@
*/
/**
- * list of mimetypes by extension
+ * Array mapping file extensions to mimetypes (in alphabetical order).
*/
-
return array(
+ 'accdb'=>'application/msaccess',
+ 'ai' => 'application/illustrator',
+ 'avi'=>'video/x-msvideo',
+ 'bash' => 'text/x-shellscript',
+ 'blend'=>'application/x-blender',
+ 'cc' => 'text/x-c',
+ 'cdr' => 'application/coreldraw',
+ 'cpp' => 'text/x-c++src',
'css'=>'text/css',
+ 'c' => 'text/x-c',
+ 'c++' => 'text/x-c++src',
+ 'doc'=>'application/msword',
+ 'docx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'dot'=>'application/msword',
+ 'dotx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
+ 'dv'=>'video/dv',
+ 'epub' => 'application/epub+zip',
+ 'exe'=>'application/x-ms-dos-executable',
'flac'=>'audio/flac',
'gif'=>'image/gif',
- 'gzip'=>'application/x-gzip',
'gz'=>'application/x-gzip',
+ 'gzip'=>'application/x-gzip',
'html'=>'text/html',
'htm'=>'text/html',
- 'ics'=>'text/calendar',
'ical'=>'text/calendar',
+ 'ics'=>'text/calendar',
+ 'impress' => 'text/impress',
'jpeg'=>'image/jpeg',
'jpg'=>'image/jpeg',
'js'=>'application/javascript',
+ 'keynote'=>'application/x-iwork-keynote-sffkey',
+ 'kra'=>'application/x-krita',
+ 'm2t'=>'video/mp2t',
+ 'm4v'=>'video/mp4',
+ 'markdown' => 'text/markdown',
+ 'mdown' => 'text/markdown',
+ 'md' => 'text/markdown',
+ 'mdb'=>'application/msaccess',
+ 'mdwn' => 'text/markdown',
+ 'mobi' => 'application/x-mobipocket-ebook',
+ 'mov'=>'video/quicktime',
+ 'mp3'=>'audio/mpeg',
+ 'mp4'=>'video/mp4',
+ 'mpeg'=>'video/mpeg',
+ 'mpg'=>'video/mpeg',
+ 'msi'=>'application/x-msi',
+ 'numbers'=>'application/x-iwork-numbers-sffnumbers',
+ 'odg'=>'application/vnd.oasis.opendocument.graphics',
+ 'odp'=>'application/vnd.oasis.opendocument.presentation',
+ 'ods'=>'application/vnd.oasis.opendocument.spreadsheet',
+ 'odt'=>'application/vnd.oasis.opendocument.text',
'oga'=>'audio/ogg',
'ogg'=>'audio/ogg',
'ogv'=>'video/ogg',
+ 'pages'=>'application/x-iwork-pages-sffpages',
'pdf'=>'application/pdf',
+ 'php'=>'application/x-php',
+ 'pl'=>'application/x-pearl',
'png'=>'image/png',
+ 'ppt'=>'application/mspowerpoint',
+ 'pptx'=>'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ 'psd'=>'application/x-photoshop',
+ 'py'=>'text/x-script.python',
+ 'reveal' => 'text/reveal',
+ 'sgf' => 'application/sgf',
+ 'sh-lib' => 'text/x-shellscript',
+ 'sh' => 'text/x-shellscript',
'svg'=>'image/svg+xml',
'tar'=>'application/x-tar',
- 'tgz'=>'application/x-compressed',
'tar.gz'=>'application/x-compressed',
- 'tif'=>'image/tiff',
+ 'tgz'=>'application/x-compressed',
'tiff'=>'image/tiff',
+ 'tif'=>'image/tiff',
'txt'=>'text/plain',
- 'zip'=>'application/zip',
+ 'vcard' => 'text/vcard',
+ 'vcf' => 'text/vcard',
'wav'=>'audio/wav',
- 'odt'=>'application/vnd.oasis.opendocument.text',
- 'ods'=>'application/vnd.oasis.opendocument.spreadsheet',
- 'odg'=>'application/vnd.oasis.opendocument.graphics',
- 'odp'=>'application/vnd.oasis.opendocument.presentation',
- 'pages'=>'application/x-iwork-pages-sffpages',
- 'numbers'=>'application/x-iwork-numbers-sffnumbers',
- 'keynote'=>'application/x-iwork-keynote-sffkey',
- 'kra'=>'application/x-krita',
- 'mp3'=>'audio/mpeg',
- 'doc'=>'application/msword',
- 'docx'=>'application/msword',
- 'xls'=>'application/msexcel',
- 'xlsx'=>'application/msexcel',
- 'php'=>'application/x-php',
- 'exe'=>'application/x-ms-dos-executable',
- 'msi'=>'application/x-msi',
- 'pl'=>'application/x-pearl',
- 'py'=>'application/x-python',
- 'blend'=>'application/x-blender',
- 'xcf'=>'application/x-gimp',
- 'psd'=>'application/x-photoshop',
- 'xml'=>'application/xml',
- 'avi'=>'video/x-msvideo',
- 'dv'=>'video/dv',
- 'm2t'=>'video/mp2t',
- 'mp4'=>'video/mp4',
- 'm4v'=>'video/mp4',
- 'mpg'=>'video/mpeg',
- 'mpeg'=>'video/mpeg',
- 'mov'=>'video/quicktime',
'webm'=>'video/webm',
'wmv'=>'video/x-ms-asf',
- 'py'=>'text/x-script.python',
- 'vcf' => 'text/vcard',
- 'vcard' => 'text/vcard',
- 'doc'=>'application/msword',
- 'docx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'xcf'=>'application/x-gimp',
'xls'=>'application/msexcel',
'xlsx'=>'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
- 'ppt'=>'application/mspowerpoint',
- 'pptx'=>'application/vnd.openxmlformats-officedocument.presentationml.presentation',
- 'sgf' => 'application/sgf',
- 'cdr' => 'application/coreldraw',
- 'impress' => 'text/impress',
- 'ai' => 'application/illustrator',
- 'epub' => 'application/epub+zip',
- 'mobi' => 'application/x-mobipocket-ebook',
- 'md' => 'text/markdown',
- 'markdown' => 'text/markdown',
- 'mdown' => 'text/markdown',
- 'mdwn' => 'text/markdown',
- 'reveal' => 'text/reveal',
- 'c' => 'text/x-c',
- 'cc' => 'text/x-c',
- 'cpp' => 'text/x-c++src',
- 'c++' => 'text/x-c++src',
- 'sh' => 'text/x-shellscript',
- 'bash' => 'text/x-shellscript',
- 'sh-lib' => 'text/x-shellscript',
+ 'xml'=>'application/xml',
+ 'zip'=>'application/zip',
);