Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • gresys
  • gresys's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 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

Please Log in or Create an account to join the conversation.

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

  • gresys
  • gresys's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
file view in form builder


file opens browser


File view needed

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

Please Log in or Create an account to join the conversation.

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

  • gresys
  • gresys's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
Thanks for reply

I want to upload multiple images for an item. How to upload multiple images?

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

Please Log in or Create an account to join the conversation.

Last edit: by admin.

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

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

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

Please Log in or Create an account to join the conversation.

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

Got it ... thanks!

Please Log in or Create an account to join the conversation.

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

  • gresys
  • gresys's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
This method will take only single image in one time. Am I right?

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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 following user(s) said Thank You: vivek

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.167 seconds

  I want to save the world...... let's cook a solution about it.
VeCrea (Forum)

Get Started