Welcome, Guest
Username: Password: Remember me

TOPIC: Multiple File Upload

File Uploader is not working 30 Oct 2013 07:05 #11481

  • gresys
  • gresys's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
Hello everyone. I am trying to use File (Datatype) and using it in my form.
It should appear like file file uploader in joomla directory, but it is showing me a simple view of file browser. while I need file uploader.
Please help me out whats going on.

file view in j-cook


file view opens browser


I want to use this file view
The administrator has disabled public write access.

File Uploader is not working 30 Oct 2013 07:12 #11482

  • gresys
  • gresys's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
file view in form builder


file opens browser


File view needed
The administrator has disabled public write access.

File Uploader is not working 30 Oct 2013 11:53 #11487

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Do you mean image picker ?

Your component contains an uploader build-in.
Image picker is not recommended.

I do not understand you post. Did you tried to post images ?
Coding is now a piece of cake
The administrator has disabled public write access.

File Uploader is not working 30 Oct 2013 14:05 #11491

  • gresys
  • gresys's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
Thanks for reply

I want to upload multiple images for an item. How to upload multiple images?
The administrator has disabled public write access.

File Uploader is not working 30 Oct 2013 15:58 #11492

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
You cannot natively.

Suggestion to achieve it :
Use the rename property {ID}/ (as directory)

for example :
{ID}/{BASE}.{MIMEXT}

Doing this, every time you save an image, it is stored in folder with the ID of the item.
Then you only need to show all images in the folder.
To erase an image, you will need to code some custom task in your controller.

Hope it helps.
Coding is now a piece of cake
Last Edit: 30 Oct 2013 15:59 by admin.
The administrator has disabled public write access.

File Uploader is not working 30 Oct 2013 17:18 #11498

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
Was just going to add images to a project I have and need clarification here ... do you suggest using the File data type or the Image data type in this case?

Thanks!
Dave
The administrator has disabled public write access.

File Uploader is not working 30 Oct 2013 17:26 #11499

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
It is the same.

What is important is you choose 'Uploader' and not image picker.
Because if you only pick up an image it will not move it to the specified folder of your item.
Coding is now a piece of cake
The administrator has disabled public write access.

File Uploader is not working 30 Oct 2013 17:34 #11500

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
Got it ... thanks!
The administrator has disabled public write access.

File Uploader is not working 31 Oct 2013 10:24 #11502

  • gresys
  • gresys's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
This method will take only single image in one time. Am I right?
The administrator has disabled public write access.

File Uploader is not working 31 Oct 2013 12:09 #11503

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Yes, this is the problem.


But, you can fork it to send an array of files, and the controller will call the uploader for each file (or the model... I even don't remember...lol)
Anyway, look inside your component and reuse the uploader, it is very easy if you code it well, a matter of few lines for dealing the upload.


Then to be able to send an array of files (JForms), this is another story. You can do it in many different maneers.
The more convenient is to create a JDom class and share it here (if you want). Then you will be able to reuse it as your please.

Then create a JForms type, calling the JDom (it will use XML file)
Or... Manually call you JDom class in the template. The XML field will be ignored and replaced. You will use the correct name property for you inputs :

I think something like that :
jform[myfiles][]
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: vivek
Time to create page: 0.113 seconds

Get Started