Victor Berchet
e0e451feb8
Fix umasks in chmod() calls
2012-04-19 15:47:04 +02:00
Jordi Boggiano
5c059aa121
Fix chmod() calls to apply umask
2012-04-19 13:35:17 +02:00
Fabien Potencier
697befc6e9
[HttpFoundation] updated the list of known mime types based on the Apache HTTPD list ( closes #3563 )
2012-03-15 14:08:50 +01:00
craigmarvelley
8935decd2c
Added support for SVG mime type
2012-02-14 11:06:36 +00:00
Fabien Potencier
d635be4e20
fixed merge
2011-12-23 09:21:58 +01:00
Fabien Potencier
5b2bc7d7f9
merged 2.0
2011-12-23 08:57:06 +01:00
Marek Kalnik
8235848b5b
[HttpFoundation][File] Add flv file default extension
2011-12-21 16:18:42 +01:00
Fabien Potencier
142cef21bb
merged 2.0
2011-12-13 16:12:53 +01:00
Fabien Potencier
e3421a0b1d
[DoctrineBridge] fixed some CS
2011-12-13 10:22:12 +01:00
Bart van den Burg
45bba7b7be
Added a hint about a possible cause for why no mime type guesser is be available
2011-12-11 19:59:22 +01:00
Fabien Potencier
bd708247f0
merged 2.0
2011-11-17 07:00:22 +01:00
jdreesen
67d91f05d4
fixed typo in exception message
2011-11-14 20:16:31 +01:00
Fabien Potencier
1340ea67a6
Merge branch '2.0'
...
* 2.0:
[HttpKernel] fixed Content-Length header when using ESI tags (closes #2623 )
[HttpFoundation] added an exception to MimeTypeGuesser::guess() when no guesser are available (closes #2636 )
[Security] fixed HttpUtils::checkRequestPath() to not catch all exceptions (closes #2637 )
[DoctrineBundle] added missing default parameters, needed to setup and use DBAL without ORM
[Transation] Fix grammar.
[TwigBundle] Fix trace to not show 'in at line' when file/line are empty.
2011-11-14 14:32:22 +01:00
Fabien Potencier
d67fbe9e48
[HttpFoundation] added an exception to MimeTypeGuesser::guess() when no guesser are available ( closes #2636 )
2011-11-14 13:21:49 +01:00
Fabien Potencier
ac5b8a4c37
merged 2.0
2011-10-26 14:29:19 +02:00
Fabien Potencier
3043fa0878
[HttpFoundation] fixed PHP 5.4 regression
2011-10-26 14:13:44 +02:00
Jordi Boggiano
88ebe0cfc4
Adjust the way of checking for windows
2011-09-17 12:57:47 +02:00
Fabien Potencier
c5e0c80a76
[HttpFoundation] made FileBinaryMimeTypeGuesser command configurable
2011-09-14 09:45:15 +02:00
Fabien Potencier
9685b0015c
merged branch brki/mimetype-extension-guesser-refactor (PR #1386 )
...
Commits
-------
34494b3
whitespace fixes
1a86a4a
Refactor mime-type to file extension guessing
e7481a3
Decouple mime-type to extension logic from File class
Discussion
----------
[2.1] Decouple mimetype-to-extension logic from File class
This allows guessing the extension from a given mime type
without requiring the existence of a local file.
If a file's meta information (mime-type, etc.) is already available (i.e. it's
been extracted once and stored in some persistent data store), it would be
nice to be able to make a best-guess on the extension based on the known mime-type.
A concrete use case of this is for the symfony-cmf, where a file has been stored
in the jackrabbit data store. When delivering this file or saving it to disk, we'd like to
use an extension that's created based on the known mime type of the file.
---------------------------------------------------------------------------
by brki at 2011/06/21 04:35:13 -0700
Now implemented similarly to the existing MimeTypeGuesser.
---------------------------------------------------------------------------
by brki at 2011/06/21 07:51:22 -0700
whitespace removed
---------------------------------------------------------------------------
by stof at 2011/09/04 05:04:54 -0700
@fabpot @brki what is the status of this PR ?
2011-09-06 08:57:16 +02:00
stealth35
ea0db2d6f4
[HttpFoundation] Remove useless ContentTypeMimeTypeGuesser
...
mime_content_type exists just for the compat between the old PHP 5.2
mime_magic extension and file_info extension
2011-07-31 14:07:00 +02:00
Fabien Potencier
7dcbcbe69d
[HttpFoundation] tagged public @api
2011-07-20 10:06:02 +02:00
Fabien Potencier
cce2bc59a8
fixed CS
2011-07-07 11:07:02 +02:00
Victor Berchet
6786e81f61
[HttpFoundation] code factorization in UploadedFile
2011-07-07 10:47:10 +02:00
Victor Berchet
d58ba34246
[Validator] Consider the ini directive 'upload_max_filesize' while validating an uploaded file (fixes GH-1441)
2011-07-05 20:05:50 +02:00
Brian King
34494b36a6
whitespace fixes
2011-06-21 15:43:43 +02:00
Brian King
1a86a4a215
Refactor mime-type to file extension guessing
2011-06-21 13:31:24 +02:00
Brian King
e7481a3f75
Decouple mime-type to extension logic from File class
2011-06-21 11:00:27 +02:00
Fabien Potencier
c7d5fd16e0
fixed CS
2011-06-15 13:46:46 +02:00
Victor Berchet
136b80ae63
[HttFoundation] Add File::getExtension() as \SplFileInfo::getExtension() was introduced in PHP 5.3.6
2011-06-14 18:18:43 +02:00
Victor Berchet
ac0c00c6e8
[HttpFoundation] Make File extends \SplFileInfo
2011-06-14 10:47:04 +02:00
Fabien Potencier
852a4c9c6a
[Form] removed the file upload temporary storage feature
...
The current implementation is not ready for inclusion in 2.0. It has several
known problems (security, not possible to disable it, not "cloud-compatible",
...) and it's not a must have feature anyway.
Some references:
* Security issue in FileType: https://github.com/symfony/symfony/issues/1001
* Validation fails on file, still stored in TemporaryStorage: https://github.com/symfony/symfony/issues/908
* Add a size argument & ability to configure TemporaryStorage: https://github.com/symfony/symfony/pull/748
This feature should be reworked and discussed for inclusion in 2.1.
2011-06-09 12:44:36 +02:00
Fabien Potencier
1e8cd6d34d
[HttpFoundation] removed the leading . for extensions
2011-06-09 12:42:42 +02:00
Fabien Potencier
1aabc5da64
fixed CS
2011-06-08 12:16:48 +02:00
jdhoek
c6172e0f96
Add {} around @inheritDoc annotation to fix this class in SF beta2
2011-05-24 00:29:42 -07:00
Bernhard Schussek
bf1dfbbe99
[Form] Added test for last commit by kriswallsmith and improved dealing with original names
...
The form component should now guarantee to always pass an UploadedFile object to your model. There you can call getOriginalName() to retrieve the original name of the uploaded file. For security reasons, the real file name is a generated hash value.
2011-05-04 17:04:44 +02:00
Victor Berchet
dccac192d6
[HttpFoundation] Sanitize uploaded file original name
2011-04-29 19:27:53 +02:00
Stepan Tanasiychuk
411997dc59
fix wrong method name
2011-04-27 23:15:27 +03:00
Fabien Potencier
00bfd10ca9
[HttpFoundation] refactored File management to be safer
2011-04-27 08:50:33 +02:00
Fabien Potencier
b7cd7115d1
[HttpFoundation] removed protected methods that were not used
2011-04-27 08:04:10 +02:00
Fabien Potencier
5bb9da4b6d
[HttpFoundation] renamed getDefaultExtension() to guessExtension()
...
The renamed method now returns null if it cannot guess the extension. It allows
the developper to know whether the extension has been guessed or not.
2011-04-27 08:03:19 +02:00
Fabien Potencier
a26de5ba58
[HttpFoundation] fixed CS
2011-04-27 08:03:15 +02:00
Fabien Potencier
854fbd7f68
[HttpFoundation] use realpath to ensure that there is no .. in file path (to match phpdoc)
2011-04-27 07:58:54 +02:00
Fabien Potencier
aa3ec504ae
removed File::getWebPath()
...
This has been removed for several reasons:
* the framework does not know where the document root is and should not care
* as the document root was static, it was impossible to have several document roots depending on some business rules (see next one)
* sometimes, the document root is not under the web root directory (so the logic of getWebPath() is not always correct)
* the feature was not used anywhere in the core
2011-04-27 06:49:05 +02:00
Fabien Potencier
2f3ddb88ef
Merge remote branch 'bschussek/form'
...
* bschussek/form:
[Form] Automatically setting "data_class" option if objects are passed at the creation of a form
[Form] Improved the way passed data is handled in FormFactory
[Form] Simplified FileType code
[HttpFoundation] TemporaryStorage automatically creates the directory if it doesn't exist yet
[Form] Changed FormBuilder::build() to FormBuilder::create(). You hvae to pass the resulting builder to FormBuilder::add() manually now
[Form] Added FieldTypeValidatorExtension and fixed FQCN of DelegatingValidator
2011-04-24 21:53:24 +02:00
Fabien Potencier
08bf2af455
fixed email
2011-04-24 13:59:46 +02:00
Bernhard Schussek
19073ae655
[HttpFoundation] TemporaryStorage automatically creates the directory if it doesn't exist yet
2011-04-24 12:08:56 +02:00
Fabien Potencier
50d3c92e22
tweaked TemporaryStorage directory creation
2011-04-23 15:19:30 +02:00
Fabien Potencier
8cc5caf1f3
changed the default directory for the upload temp dir, made the dir mandatory
2011-04-23 15:09:55 +02:00
Fabien Potencier
02c66e658c
removed the nestingLevel configuration for file temporary storages
2011-04-23 15:06:07 +02:00
Pascal Borreli
b5769c52d6
Fixed various typo
2011-04-22 23:12:50 +00:00
Eriksen Costa
589b0ab4ed
Merge branch 'master' into form-frameworkbundle-form-guessers-fix
...
Conflicts:
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddFormGuessersPass.php
src/Symfony/Component/Form/MoneyField.php
2011-04-21 23:03:40 -03:00
Tim Nagel
03bb3580a6
[HttpFoundation\File] Removed realpath()
2011-04-20 23:52:17 +10:00
Brikou CARRE
e898445b94
removed empty lines/trailing spaces
2011-04-15 21:12:02 +02:00
Bernhard Schussek
bbeddf7789
Merge remote branch 'symfony/master' into experimental
2011-03-31 12:32:20 +02:00
Pascal Borreli
44a6f84855
[HttpFoundation][Windows] Fixed filebinary guesser method.
2011-03-30 17:38:42 +00:00
Bernhard Schussek
55c14680d3
Merge remote branch 'symfony/master' into experimental
2011-03-30 10:31:21 +02:00
Pascal Borreli
dbb18662d7
[HttpFoundation][Windows] Disabled FileBinaryMimeTypeGuesser for Windows OS
2011-03-29 14:32:20 +00:00
Bernhard Schussek
89215d167d
Merge remote branch 'symfony/master' into experimental
2011-03-19 13:25:41 +01:00
Kris Wallsmith
73db141ce6
[HttpFoundation] stripped tags from native error messages in case html_errors is on
2011-03-18 11:11:42 -07:00
Bernhard Schussek
3f70f89339
Merge remote branch 'symfony/master' into experimental
...
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
src/Symfony/Component/HttpFoundation/File/UploadedFile.php
2011-03-18 10:39:40 +01:00
Kris Wallsmith
ab3b8ac364
[HttpFoundation] cleaned up comments and coding standards, added better exception messages when filesystem functions throw errors, added "moved" arg to UploadedFile constructor, added FileNotFoundException to UploadedFile per the parent constructor
2011-03-17 16:07:53 -07:00
Bernhard Schussek
0bf566310c
Merge branch 'event-manager' into experimental
...
Conflicts:
src/Symfony/Component/Form/BirthdayField.php
src/Symfony/Component/Form/CheckboxField.php
src/Symfony/Component/Form/ChoiceField.php
src/Symfony/Component/Form/ChoiceList/TimeZoneChoiceList.php
src/Symfony/Component/Form/CollectionField.php
src/Symfony/Component/Form/DateField.php
src/Symfony/Component/Form/DateTimeField.php
src/Symfony/Component/Form/EntityChoiceField.php
src/Symfony/Component/Form/Events.php
src/Symfony/Component/Form/FieldFactory/FieldFactory.php
src/Symfony/Component/Form/FieldFactory/FieldFactoryInterface.php
src/Symfony/Component/Form/FileField.php
src/Symfony/Component/Form/Filters.php
src/Symfony/Component/Form/FormContext.php
src/Symfony/Component/Form/FormContextInterface.php
src/Symfony/Component/Form/FormFactoryInterface.php
src/Symfony/Component/Form/HybridField.php
src/Symfony/Component/Form/IntegerField.php
src/Symfony/Component/Form/LanguageField.php
src/Symfony/Component/Form/LocaleField.php
src/Symfony/Component/Form/MoneyField.php
src/Symfony/Component/Form/NumberField.php
src/Symfony/Component/Form/PasswordField.php
src/Symfony/Component/Form/PercentField.php
src/Symfony/Component/Form/RepeatedField.php
src/Symfony/Component/Form/TextField.php
src/Symfony/Component/Form/TimeField.php
src/Symfony/Component/Form/ToggleField.php
src/Symfony/Component/Form/UrlField.php
src/Symfony/Component/HttpFoundation/File/UploadedFile.php
tests/Symfony/Tests/Component/Form/FileFieldTest.php
tests/Symfony/Tests/Component/Form/FormContextTest.php
tests/Symfony/Tests/Component/Form/HiddenFieldTest.php
2011-03-13 21:04:24 +01:00
Jordi Boggiano
991b1ed225
[HttpFoundation] UploadedFile::getOriginalName is now overriding getName
2011-03-09 17:26:08 +01:00
Jordi Boggiano
2a5fcdfb1a
[HttpFoundation] Minor optimization
2011-03-09 17:25:36 +01:00
Fabien Potencier
8c423edfef
replaced symfony-project.org by symfony.com
2011-03-06 12:40:06 +01:00
Bernhard Schussek
68013f4db2
Merge remote branch 'symfony/master' into experimental
2011-03-02 12:27:30 +01:00
Pascal Borreli
ff44b0ff28
[HttpFoundation] Removed remove recurring test
2011-03-01 18:58:07 +01:00
Pascal Borreli
fc42cc5066
[HttpFoundation] Removed useless else
2011-02-27 18:36:38 +01:00
Pascal Borreli
f3b9364eae
[HttpFoundation] Fixed typo
2011-02-26 20:02:06 +01:00
Bernhard Schussek
c6e9fd97b6
[Form] Fixed various bugs
2011-02-25 00:09:10 +01:00
Bernhard Schussek
e334c4734e
[Form] Registered FormFactory in the DIC
2011-02-24 21:27:44 +01:00
Bernhard Schussek
f2c1976da6
[Form] Refactored FileField to FormFactory and fixed file upload mechanism
2011-02-24 20:47:48 +01:00
pborreli
7ad4f99153
[HttpFoundation] File/UploadedFile, MimeTest, Exception full coverage
2011-02-06 21:53:36 +01:00
pborreli
f56a6efbf5
[HttpFoundation] File/File full coverage
2011-02-05 23:24:00 +01:00
Dominique Bongiraud
996c2b0914
[HttpFoundation] Moved licence
2011-01-29 16:12:10 +01:00
Ryan Weaver
17f9162b89
[Standards] Changing many instances of "boolean" to "Boolean".
2011-01-21 09:53:24 +01:00
Dominique Bongiraud
64fb94c725
normalized license messages in PHP files
2011-01-18 08:07:46 +01:00
hhamon
e2dc7f47cb
[HttpFoundation] use pathinfo() native function to determine file extension. Change File::move() and UploadedFile::move() methods to accept a second argument allowing to move the file with a new name instead of moving it with its original name.
2011-01-15 15:44:50 +01:00
Bernhard Schussek
8513082007
[Form][HttpFoundation] Improved File and UploadedFile class
2011-01-03 22:06:56 +01:00
Jordi Boggiano
e69c5ae860
Coding style fixes
2010-11-18 07:00:03 +01:00
Bernhard Schussek
e9fcacdad7
[HttpFoundation] Fixed: File/UploadedFile did not adjust path when moved
2010-10-22 08:30:14 +02:00
Kris Wallsmith
0b1f3145ae
Removed unnecessary "public" from interface method signatures.
2010-10-18 16:55:09 +02:00
pborreli
86cc6a11d9
[Component] Fixed some spelling typos
2010-10-17 07:51:50 +02:00
Fabien Potencier
a141c98917
[HttpFoundation] moved File Component into the HttpFoundation one
2010-09-09 17:01:48 +02:00