New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add validator upload file #284
Conversation
* @param string $folderId | ||
* | ||
* @return MediaInterface | ||
*/ | ||
public function createMediaFromUploadedFile(UploadedFile $uploadedFile, $filename, $folderId); | ||
public function createMediaFromUploadedFile(UploadedFile $uploadedFile, $folderId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alavieille : maybe introduce a new function and tag the other as deprecated ?
@ngilain pr upadted |
@@ -120,27 +121,28 @@ public function uploadAction($folderId, Request $request) | |||
$uploadedFile = $request->files->get('file'); | |||
$saveMediaManager = $this->get('open_orchestra_media_admin.manager.save_media'); | |||
|
|||
if ($uploadedFile && $filename = $saveMediaManager->getFilenameFromChunks($uploadedFile)) { | |||
if ($uploadedFile && $uploadedFile = $saveMediaManager->getFilenameFromChunks($uploadedFile)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alavieille : you need to change the method name if it's now returning an UplodadFile instead of string. Something like getFileFromChunks ?
@ngilain pr updated |
👍 |
148f343
to
ab635cb
Compare
[OO-FEATURE] Add possibility to validate a media before upload
[OO-DEPRECATED] SaveMediaManager::isFileAllowed is deprecated and will remove in 2.0
[OO-DEPRECATED] SaveMediaManager::createMediaFromUploadedFile is deprecated and will remove in 2.0 use initializeMediaFromUploadedFile
[OO-DEPRECATED] SaveMediaManager::getFilenameFromChunks is deprecated and will remove in 2.0 use getFileFromChunks
open-orchestra/open-orchestra-media-bundle#234
open-orchestra/open-orchestra-docs#231