I'm new with Symfony and MediaBundle, can't find tutorial how to upload files to server using MediaBundle, only display. Video would be perfect. I'm using latest Symfony 2.5. I need simple file upload, without any Sonata Media Bundle, or I must use Sonata for upload?
Only official example I found:
http://symfony.com/doc/current/cmf/bundles/media/introduction.html#uploading-files
and no working code examples.
For uploading, I use the OneupUploaderBundle and use jQuery for my front end. Uploading can be involved because you have to handle different interfaces on users and then also have a method to save files on your server. This bundle allows you to use different front ends for the design and has sever nice events for handling different types of uploads.
I use the included oneup_uploader.pre_upload event to review the file that will be uploaded and use oneup_uploader.post_upload to have the file's name stored in a related entity so I can easily access it from a controller/service. It has some decent examples but post any questions if you are stuck. One of the most useful features for me is the custom logic for uploads.
Related
I use Laravel 5.5 and I tried to use Pion chunk upload to upload large files. I followed the steps and I think backend should work. The problem is that I am unable to make work the frontend uploader. I want to use a vue component for this task and I tried several of them, but the most promising was the Simple Uploader.
Can someone show me a full example of these two working together?
I am new in SYmfony and going to make a blog service with symfony2. I want to let user upload a picture and show it On his/her post. what should I do?
Use dustin10/VichUploaderBundle.
Instructions on how to use the bundle can be found in the documentation.
Further information can be found in the cookbook chapter How to handle File Uploads with Doctrine but VichUploaderBundle is the easiest way to get you started.
For image processing have a look at LiipImagineBundle.
I am currently working with WordPress on a project and I need to allow the WordPress Media-Uploader.
I need to allow the upload of flash files since everytime I attempt to upload a flash file i get the following error: Sorry, this file type is not permitted for security reasons.
I tried to find within the doc but I couldnt find a place where it tell me how to allow flash files.
Could anyone point me in the right direction?
This is by design. To allow this you'll need to either change the core or install a plugin such as http://wordpress.org/plugins/mime-types-extended/.
There are other plugins here: http://wordpress.org/plugins/search.php?q=mime
Edit:
According to this tutorial, you can infact define additional mimetypes easily.
I'm creating a WordPress plugin that allows a user to select one of several image files that are distributed with it. Is there a simple technique for allowing the user to view the files in a filebrowser-like interface and pick one? I want it to look as similar as possible to picking a file in the normal file upload dialog.
I ended up adapting the code from this filebrowser that utilizes scandir. It has a nice simple interface and the code is simple enough to incorporate into a plugin.
I am looking for a really simple PHP image gallery system that allows file uploads and provides easy integration into any existing PHP script. I only found full galleries with database backend and templating systems for integration and the too simple ones that just take a folder with (FTP uploaded) images and show it but don't provide the possibilities for file uploads.
I'm quite close on writing my own, cause I didn't find anything yet, but I first wanted to ask if you have any suggestions.
Ok so I have a very early version of it on Github, it is under development (and not really nice yet, I just needed the admin interface up and running) but contributions and comments are welcome.