fileupload plugin

JBosir

Member
Hello.

When I add an image, this image is not displayed. Puts the image name. I have to to record the registry and come back to see. (Section 1 of the image I attached).

When changing an image, the name appears next to the "Browse" button, but the image is old. (point 2).

When I edit a record, the image that was selected appears. The text on the Browse button "not selected any file" is false. There is one previously selected. You should put the name of the image that was established. I can not find where to change the translation file. (item 3).

Is there any solution?
Thank you.

Hola.
Cuando a?ado una imagen, esta imagen no se visualiza. Pone el nombre de la imagen. Tengo que grabar el registro y volver a entrar para ver. (punto 1 de la imagen que adjunto).
Al cambiar una imagen, el nombre aparece al lado del bot?n "Examinar", pero la imagen es la antigua. (punto 2).
Cuando modifico un registro, aparece la imagen que estaba seleccionada. El texto que aparece en el bot?n Examinar "No se ha seleccionado ning?n archivo" es falso. Hay uno seleccionado previamente. Deber?a poner el nombre de la imagen que estaba establecida. No encuentro el archivo d?nde cambiar la traducci?n. (punto 3).
Hay alguna soluci?n?
Gracias.
 

Attachments

  • img1.png
    img1.png
    77.3 KB · Views: 211
This is how it's working.
The image is showing the picture which has been uploaded and which "belongs" to the record at the time of display.

"Examinar" (choose file) is for selecting a (new) file.
This selected file will be uploaded on SAVE and the record will be modified on SAVE.
 
I know. When changing picture I was thinking as a possible solution to automatically save and refresh the page.
would be possible?

Lo se. Cuando se cambie de imagen Yo pensaba como una posible soluci?n poder guardar automaticamente y actualizar la p?gina.
ser?a posible?
 
Not sure what you are want to do.
But have a look at the fileupload with Ajax uploads= yes instead of a simple fileupload in a repeated group.
 
Hello again, I continue trying to display the image after his election.
I tried with Ajax uploads = yes. choose image. But with "Repeated group" does not work. Further has many steps, "1" you select an image, "2nd" Download image "3rd" you have to press an icon to see the image.

To the solution, my idea is to save the selected file in the database, and refresh the screen (like pressing "apply" button automatically)

To do this, in the fileupload element:

in validations, Action php php code:

PHP:
$db = JFactory::getDbo();
$change_image = JRequest::getVar('mv_campaigns___image');
$change_id = JRequest::getVar('mv_campaigns___campaignId');
$sql="UPDATE `mv_campaigns` SET `image`=$change_image where `campaignId` = $change_id";
 
$db->setQuery($sql);
 
$db->query();


Javascript code in the "change" event:

js:
Code:
location.reload (true);
When the "load image" ends, the page refreshes, but does not validate.
 
What browsers do you need to support?

In HTML5, this can be done without storing anything on the server or submitting the form, by using the HTML5 FileReader JS class, which is supported by these browsers:

http://caniuse.com/#feat=filereader

It's something I've considered adding to the standard file upload element.

-- hugh
 
Hello. Thank you for the answer.​
In another post, I wrote this:​
Hi, Hugh,

Let me start by giving you an example.

In this forum, when I want to download a file, I just click on the button, choose the image and right away the file starts downloading and finally it can be viewed. That's what I want to achieve.

I've got a form for that, which includes a complement called fileuploadI've trying to make it work for a week and couldn't. When I click on the apply button, the table updates and also does the image. I think that for the moment that is a solution to the problem, that is, to download and update the image by calling the apply function on the validation button.

I also tried to use Ajax upload. To me, that has a problem. First, you have to select and then download the file (it doesn't do it automatically) and at the end you have to click on a thumbnail to see the image as this is not viewed automatically.​

Regarding the last comment:​
I have prepared the pages so that you can see it.
I have proven HTML5 FileReader JS in a temporary page and it works well, the images refresh:
http://ma.eui.upm.es/new/test.php

In my page it doesn't work. It doesn't refresh the images, neither in the frontend neither in the backend.
http://www.ma.eui.upm.es/new/test/form/1/1-pepe
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top