[Fusionforge-commits] r16607 - branches/Branch_5_1/src/common/docman/actions

Franck VILLAUME nerville at fusionforge.org
Fri Oct 19 20:02:45 CEST 2012


Author: nerville
Date: 2012-10-19 20:02:44 +0200 (Fri, 19 Oct 2012)
New Revision: 16607

Modified:
   branches/Branch_5_1/src/common/docman/actions/addfile.php
Log:
fix mimetype detection in case of application/octet-stream is found

Modified: branches/Branch_5_1/src/common/docman/actions/addfile.php
===================================================================
--- branches/Branch_5_1/src/common/docman/actions/addfile.php	2012-10-19 11:44:42 UTC (rev 16606)
+++ branches/Branch_5_1/src/common/docman/actions/addfile.php	2012-10-19 18:02:44 UTC (rev 16607)
@@ -7,6 +7,7 @@
  * Copyright 2010, Franck Villaume - Capgemini
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
  * Copyright 2012, Thorsten Glaser - tarent solutions GmbH
+ * Copyright 2012, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -116,6 +117,9 @@
 		} else {
 			$uploaded_data_type = $uploaded_data['type'];
 		}
+		if ($uploaded_data_type == 'application/octet-stream' && $uploaded_data_type != $uploaded_data['type']) {
+			$uploaded_data_type = $uploaded_data['type'];
+		}
 		$data = fread(fopen($uploaded_data['tmp_name'], 'r'), $uploaded_data['size']);
 		$file_url = '';
 		$uploaded_data_name = $uploaded_data['name'];




More information about the Fusionforge-commits mailing list