-
Notifications
You must be signed in to change notification settings - Fork 0
feat/upload #46
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
base: master
Are you sure you want to change the base?
feat/upload #46
Conversation
| // this up() migration is auto-generated, please modify it to your needs | ||
| $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
|
||
| $this->addSql('DROP TABLE customer'); |
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.
il faudra que tu rebase ta table pour ne pas garder customer dans ta migration
| { | ||
| private $targetDirectory; | ||
|
|
||
| // public function __construct($targetDirectory) |
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.
ne merge jamais de code commenté. Si tu n'as pas besoin de se bout de code tu le vire. Si tu n'en as pas besoin dans cette PR, tu le fais dans une pr distincte. 90% du code commenté reste du code mort
| // //$this->targetDirectory = $targetDirectory; | ||
| // } | ||
|
|
||
| public function upload(UploadedFile $file) |
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.
type ta sortie
| ); | ||
| $fileName = $safeFilename.'-'.uniqid().'.'.$file->guessExtension(); | ||
|
|
||
| try { |
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.
ta méthode ne va pas car tu retourne soit ton $fileName, soit void. Dans ton cas, je retournerais toujours une string soit le filename, soit ''.
Du coup tu peux virer ton try catch qui ne te sert pas
No description provided.