You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have a problem to upload the image to the server. I have installed the bundle, pop up displays correctly when I selected an image, it is uploaded to the server, but in return it does not appear in the pop up.
Looking at the console I noticed an error in routing. The URL I use to upload the files is as follows:
I already noticed that the path of the url are not correct.
Can anyone help me?
My entity :
Hello,
I have a problem to upload the image to the server. I have installed the bundle, pop up displays correctly when I selected an image, it is uploaded to the server, but in return it does not appear in the pop up.
Looking at the console I noticed an error in routing.
The URL I use to upload the files is as follows:
I already noticed that the path of the url are not correct.
Can anyone help me?
Hello,
I have a problem to upload the image to the server. I have installed the bundle, pop up displays correctly when I selected an image, it is uploaded to the server, but in return it does not appear in the pop up.
Looking at the console I noticed an error in routing.
The URL I use to upload the files is as follows:
Same problem here, the upload works fine but I can't manage to get the uploaded images after that (in the pop up).
The path looks like that : "http://localhost/uploads..." instead of something like that: "http://localhost/myfolder/web/uploads...".
Hello,
I have a problem to upload the image to the server. I have installed the bundle, pop up displays correctly when I selected an image, it is uploaded to the server, but in return it does not appear in the pop up.
Looking at the console I noticed an error in routing. The URL I use to upload the files is as follows:
http: //localhost/congo-job/cj-symf/web/app_dev.php/demo/imageTest/new
but in the console I get this error:
Failed to load resource: the server responded with a status of 404 (Not Found)
http: //localhost/uploads/test/5bbfd314905a0b267d0b3f5c36ef0f8897415f42.jpg 1435321243541?
I already noticed that the path of the url are not correct.
Can anyone help me?
My entity :
Hello,
I have a problem to upload the image to the server. I have installed the bundle, pop up displays correctly when I selected an image, it is uploaded to the server, but in return it does not appear in the pop up.
Looking at the console I noticed an error in routing.
The URL I use to upload the files is as follows:
http: //localhost/congo-job/cj-symf/web/app_dev.php/demo/imageTest/new
but in the console I get this error:
Failed to load resource: the server responded with a status of 404 (Not Found)
http: //localhost/uploads/test/5bbfd314905a0b267d0b3f5c36ef0f8897415f42.jpg 1435321243541?
I already noticed that the path of the url are not correct.
Can anyone help me?
Hello,
I have a problem to upload the image to the server. I have installed the bundle, pop up displays correctly when I selected an image, it is uploaded to the server, but in return it does not appear in the pop up.
Looking at the console I noticed an error in routing.
The URL I use to upload the files is as follows:
http: //localhost/congo-job/cj-symf/web/app_dev.php/demo/imageTest/new
but in the console I get this error:
Failed to load resource: the server responded with a status of 404 (Not Found)
http: //localhost/uploads/test/5bbfd314905a0b267d0b3f5c36ef0f8897415f42.jpg 1435321243541?
I already noticed that the path of the url are not correct.
Can anyone help me?
id; } /** * Set photo * * @param string $photo * @return Image */ public function setPhoto($photo) { $this->photo = $photo; return $this; } /** * Get photo * * @return string */ public function getPhoto() { return $this->photo; } public function getUploadRootDir() { // absolute path to your directory where images must be saved return str_replace("\\", '\\\\', __DIR__.'/../../../../web/'.$this->getUploadDir()); } public function getUploadDir() { return 'uploads/test'; } public function getAbsolutePath() { return null === $this->photo ? null : $this->getUploadRootDir().'/'.$this->photo; } public function getWebPath() { return null === $this->photo ? null : '/'.$this->getUploadDir().'/'.$this->photo; } /** * Set originalImage * * @param string $originalImage * @return Image */ public function setOriginalImage($originalImage) { $this->originalImage = $originalImage; return $this; } /** * Get originalImage * * @return string */ public function getOriginalImage() { return $this->originalImage; } ``` } ImageType: getForm()->getData(); ``` $builder ->add('photo', 'comur_image', array( 'uploadConfig' => array( 'uploadRoute' => 'comur_api_upload', //optional 'uploadUrl' => $myEntity->getUploadRootDir(), // required - see explanation below (you can also put just a dir path) 'webDir' => $myEntity->getUploadDir(), // required - see explanation below (you can also put just a dir path) 'fileExt' => '*.jpg;*.gif;*.png;*.jpeg', //optional //'libraryDir' => null, //optional 'libraryRoute' => 'comur_api_image_library', //optional 'showLibrary' => true, //optional 'saveOriginal' => 'originalImage' //optional ), 'cropConfig' => array( 'minWidth' => 200, 'minHeight' => 200, 'aspectRatio' => true, //optional 'cropRoute' => 'comur_api_crop', //optional 'forceResize' => false, //optional 'thumbs' => array( //optional array( 'maxWidth' => 200, 'maxHeight' => 200, 'useAsFieldImage' => true //optional ) ) ) )) ; } /** * @param OptionsResolverInterface $resolver */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( 'data_class' => 'Acme\DemoBundle\Entity\Image' )); } /** * @return string */ public function getName() { return 'acme_demobundle_image'; } ``` } Image\new.html.twig : {% extends '::base.html.twig' %} {% block javascripts %} ``` <script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script> <script src="{{ path('fos_js_routing_js', {"callback": "fos.Router.setData"}) }}"></script> ``` {% endblock %} {% block body -%} ``` {% include "ComurImageBundle:Form:croppable_image_modal.html.twig"%}Image creation
{{ form(form) }}The text was updated successfully, but these errors were encountered: