Skip to content
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

Can't upload file when create new object with form #403

Closed
maciejmigas opened this issue Jun 6, 2015 · 2 comments
Closed

Can't upload file when create new object with form #403

maciejmigas opened this issue Jun 6, 2015 · 2 comments
Labels

Comments

@maciejmigas
Copy link

Hello,
have any1 idea hot to resolve my problem what I described here http://stackoverflow.com/questions/30688375/symfony-2-vichuploader-cant-handle-file ?

@fundup
Copy link

fundup commented Jul 1, 2015

USing Symfony 2.7 and VichUploaderBundle 0.14.
I think I have the sale problem. When I submit my form I don't have a file but a string :

public function setImage( File $image = null) {
$this->image = $image;
if ($image) {
// It is required that at least one field changes if you are using doctrine
// otherwise the event listeners won't be called and the file is lost
$this->imageUpdatedAt = new \DateTime('now');

$image parameter is equal to the filename.

@garak
Copy link
Collaborator

garak commented Dec 18, 2016

See #297

@garak garak closed this as completed Dec 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants