File upload in Magento

Whan of the most enticipated and needed things in Magento is File upload Custom Option. As discussed last year at Magento Forum, it is not completed nor tested.
Now, Magento already have frontend and admin part of file upload option implemented in themes. Since backend part is still missing, understand that this still doesn’t work, however, if you’re interested how it looks, read on ..
Frontend html is found in:
app/design/frontend/default/default/template/catalog/product/view/options/type/file.phtml
Frontend javascript code in:
app/design/frontend/default/default/template/catalog/product/view/options.phtml
(optionFileUpload js object = asynchronous iframe upload)
You can enable file upload custom option if you add:
<file translate="label" module="adminhtml">
<label>File</label>
<render>adminhtml/catalog_product_edit_tab_options_type_file</render>
<types>
<file translate="label" module="adminhtml">
<label>File Upload</label>
</file>
</types>
</file>
inside node:
config->global->catalog->product->options->custom->groups
in:
app/code/core/Mage/Catalog/etc/config.xml
Now you have new File Upload option that you can add to product!
We are coding module of similar functionality for one of our clients as we speak, but we have our fingers crossed to see this option in next Magento version!
45 comments
Hi
It helped me a lot in my work, Thanks a lot for sharing this
I am facing the error in the Magento for using the services.
Very nice. it’s helpful information thanks for your blog.
magento frontend file upload option work for everybody… !!
Hi,
IS this is default magento feature in 1.9 ? but its not displaying any option to upload in frontend.
I checked in files your xml code is already present in 1.9
please help me to find solution.
A more workable and the one which is used widely for file upload in Magento is from FME. It has more advanced features for file attachments and user friendly front and back ends.
Hi,
I want to add a file(Excel/CSV) upload option in magento front end and the functionality of this will be adding products to cart. I mean this file will contain Product SKU and Quantity details. As I upload the file with said details those product will be added to the cart. Please Help….
Hai I am using magento 1.8.1.0. was it support for my version because if i am upload an image from front end
“Please specify the product’s required option(s)” error occurs guide me to solve this its urgent
hai am trying this if i am upload image am getting Please specify the product’s required option(s). this error help me to fix this issue
Does anyone know where the files goes once customer uploads. Unable to find anywhere… Not even in my backend media folder files.
Nice! didn’t knew it existed and was almost going to spend money on custom module.
How to upload picture using magento from frontend?
Please suggestion me.
Hi,
I want to have a feature where first a customer place an order and then as per selected option, they can upload number of images from their account for that order.
For example,
1) Customer purchase process of 10 images at $100
2) They pay $100 to us
3) Now in back end, since they have purchased 10 images for this order, they can upload up to 10 images which we as admin can see and work on that.
Is it possible with magento and if so how?
Thanks in advance,
Dyna May
It worked, tnx. Bless.
Hi,
If you are looking to upload files and attach them to a product for display to a user then we have created a plugin that will easily solve this.
With our plugin you can browse to the file in the backend and attach it to one or more plugins easily. You can upload any file in to Magento (mp3, doc, pdf, wav, xsl, ppt, mov, avi, flx or anything else you can think of).
You can find the plugin here:
http://www.magemechanics.com/product-file-uploader-v2.html
Wonderful solution. Thanks! Loved your blog by the way 😉
Hi,
Its a bit of an off topic, but would you know of a way to add file attachment to the customer registration ? I’ve managed to add custom fields but I´m struggling a bit with file attachment
Regards,
James
Your front end looks interesting but i miss some really important functions.
Can everybody upload and delete files?
Or is the upload only possible if the user is logged in?
Is the uploaded file assigned to the user and the selected product?
Can i add a description and a title to the uploaded file?
Do you support a function to read out the uploaded files (a hrefs) on a another position on the product page (like PHP getProduct().getUploadedFiles()) ?
Cheers
David
For those insterested, we have just release a front-end file upload progress bar for Magento 1.4.xx. You can find more information here: http://www.squarefootmagento.com/news/file-upload-progress-bar-magento
Demo here: http://squarefootmagento.com/demo/magento-file-upload-progress-bar.html
Cheers.
SFM
Can you post the code from image.php ?
The error ist thrown on line 61, maybe a parameter is missing?
Hi
i have created form with my custom extension for image uploading it upload image perfectly with magento uploader
but when i edit the form without upload any image it throws error:
Warning: preg_match() expects parameter 2 to be string, array given in /lib/Varien/Data/Form/Element/Image.php on line 61
please help if you have any solution for this.
Hi, I wanna add image uploaded functionality on review Form and want to display with each review. Can anyone pls help me on this?
Thanks in advance.
Hi,
I want to add image upload functionality on review form. Can you please help me.
Thanks,
JAI
I want to set a file upload option in the customer’s My Account dashboard. I want customer to uplaod an image from his login dashboard and that uploaded image can be seen in the admin panel and frontend both.
If someone knows how to do that or have an idea please help me.
Thanks in advance.
kiat asked first “I’d like to have an option for customers to upload their pictures of wearing or using the products and placed these along the product images for all to view. Can it be a possibility with this file upload method?”
Did anybody find a solution meanwhile ???
Hi,
Thanks for posting this. Does anyone know where does the uploaded files are sent to. In admin under sales>orders it shows he file but cant view it or save it.
Any help would be appreciated.
Thanks
Does anyone know where we could find a file upload progress bar, my files are taking ages to upload ??
@Magento Mechanic, your extension does not do what this page is talking about. Unless I’m wrong, your extension allows files to be uploaded and linked to PRODUCTS. This page is talking about files uploaded and linked to ORDERS. Your extension looks great, but it’s not even close to the same thing. If you coded an extension that lets me upload a file in the backend to link it to an order, I’ll buy it.
@ron k, the file is linked to the order and there is a link to download it in the backend when you view the order.
http://www.magentocommerce.com/magento-connect/order-upload-extension.html
We had the same issue, and could not find an extension, I believe this is what you are looking for…Hope this helps
If you would like a of the shelf module to solve this problem Magento Mechanics have solved the issue with a easy to install module that prodives extra functionality.
it can be found at: http://magentomechanics.com/product-file-uploader-v2.html
where does the file go once uploaded? how does the admin see the file?
Simple question – where is the button to upload images to put on individual pages like the home page?
hi
i m in very trouble in magento.
i have upgreaded magento in to 1.3.2.4 version
and after upgraded it is not shown upload image button and browse file button so please help how can i upload product image
i have also new version of flash player rather than it is not appear .
please reply me quick it is very urgent
Did you also try to make two custom options for upload. If we do this in magento one is working and the other one is not working.
see also http://www.magentocommerce.com/boards/viewthread/39230/
It works for single file upload option, but not for multiple (if you want to have more than one file upload option).Will upload only first file.
File upload Custom Option is built in in new Magento 1.3.0. Just released!
I just tested it, works great 😉
I have the same problem like Dilizo. I’ve modified xml file but i can’t see this option file upload. Can someoane help, please…
Magento is so powerful,and i have to give up joomla+virtuemart based website and build my online store with magento.
does magento has CSV bulk upload function?
hello guys, i modified xml file but i can’t see this option file upload pls help!
Hi Adam,
That sounds lovely. 🙂
I can tell you that this functionality will be available with magento v1.3 – also, you will see if you enable the fileupload at the moment that it is going to cause you problems without further modifications.
Cheers
Adam
OnTap Creative
Tweakmag
I modifiy the xml file as you mentionned but I can’t see any attributes “file upload”.
I might have done things wrong ?
hello folks,
Where can i get this option, i really need this fonction to mu futur website.
yours sincerely,
neo
This upload method will be primarily used to submit some file along purchasing a product. For your case i suggest independent upload form somewhere on site, couse those people already purchased product.
I’d like to have an option for customers to upload their pictures of wearing or using the products and placed these along the product images for all to view. Can it be a possibility with this file upload method?