Yii Framework Forum: [Extension] Xupload - Yii Framework Forum

Jump to content

  • (20 Pages)
  • +
  • « First
  • 18
  • 19
  • 20
  • You cannot start a new topic
  • You cannot reply to this topic

[Extension] Xupload

#381 User is offline   mstdmstd 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 16-March 14

Posted 14 June 2014 - 02:38 AM

Hi,
I use XUpload extension, thanks for it.
My questions are :
1) If there is a to change html of uploaded images preview,
actually I do not use thumbnail_url, as I do not need to generate thumbnails and I want to show thumbnails in my own way ?
2) How to trigger Javascript Event when 1 image is uploaded from click on "Start" in upload List or
all images are uploaded by click on "Start upload" button?
0

#382 User is offline   jak007 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 07-May 14

Posted 20 June 2014 - 07:52 AM

hlo everybody i am using XUpload extension but in this extension there was no XUploadForm file was given so i am using this form which i given below


<?php
class XUploadForm extends CFormModel
{
public $file;
public $mime_type;
public $size;
public $name;
/**
* Declares the validation rules.
* The rules state that username and password are required,
* and password needs to be authenticated.
*/
public function rules()
{
return array(
array('file', 'file'),
);
}

/**
* Declares attribute labels.
*/
public function attributeLabels()
{
return array(
'file'=>'Upload files',
);
}

public function getReadableFileSize($retstring = null) {
// adapted from code at http://aidanlister.c...ze_readable.php
$sizes = array('bytes', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');

if ($retstring === null) { $retstring = '%01.2f %s'; }

$lastsizestring = end($sizes);

foreach ($sizes as $sizestring) {
if ($this->size < 1024) { break; }
if ($sizestring != $lastsizestring) { $this->size /= 1024; }
}
if ($sizestring == $sizes[0]) { $retstring = '%01d %s'; } // Bytes aren't normally fractional
return sprintf($retstring, $this->size, $sizestring);
}
}
?>


but i have problem i am getting error that XUploadForm.url is undefined.

please help me. i didn't understand where is the problem
0

#383 User is offline   fe085 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 02-July 14

Posted 03 July 2014 - 02:25 AM

Hello. I was so worn out with this plugin. I'm going crazy. Already spent more than 12 hours.
I need to use one model for his images from the database.
When you add images stored in the data base.
When editing I want to display a list of images from the database.
I do not understand what fields and methods in the model should be and how to save data (in json or not).
I'm tired. Help please.
Does anyone have any source code or a working example for such a detailed description of how stupid I.
0

#384 User is offline   M.Bodnar 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 07-September 14

Posted 21 September 2014 - 06:08 AM

I need load the existing files in my directory using ajax. Sorry i can't public my code. Please give me a link or other suggestion in that direction
0

#385 User is offline   BigBawss 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 26-March 13
  • Location:Utrecht, Netherlands

Posted 28 October 2014 - 11:26 AM

Hey,

I've been using the xupload extension for quite some time and it seems like a good extension. I came across this one issue here and that is that I can't figure out how to refresh a certain div element with database information using AJAX after the upload was succesful. I am working on an image manager using xUpload but I don't have the slightest clue where to add code in order for that div to refresh. I hope somebody can shoot me towards the right direction o/
Every night, I read the Yii Manual to fall asleep. Take it in a good way (because I like reading it?) or in a bad way (It's soo massive that I quickly get tired of it), up to you ;)
0

#386 User is offline   gjportegies 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 27-August 14
  • Location:Amsterdam

Posted 22 November 2014 - 08:12 AM

How can I disable the preview showing up after uploading the file?
0

#387 User is offline   Amini 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 29-December 12

Posted 05 January 2015 - 04:15 AM

hi Asgaroth,
can you update this extension with jquery 1.11.2? or update jquery file upload into last version?
0

#388 User is offline   LucioD 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 24-December 13

Posted 09 April 2015 - 01:41 PM

Hello everyone,
I'm using for the first time Yii Xupload Extension. I followed the setup instructions relatively to the section "Using XUploadAction and XUploadForm" and everything works, except for the following annoying effect:

when I upload any image, at the user interface level, it always happens that its image preview is replaced with the resize of the image itself, with very much size resolution, so that the screen scrolls horizontally so much.

I do not want this image resize, so I tried to add to the widget parameter 'disableImageResize' => true (from blueimp/jQuery-File-Upload Options documentation), but it continues quietly to do the image resize with very much size resolution.

1) How I can do to avoid the after upload images resize, leaving the images preview exactly as they were before?
2) Also, I would like to try to analyze the javascript part, but I can not find the start-point of these, not even to put some debug alert!.

Can you help me please?

Thank you very much in advance.
0

#389 User is offline   LucioD 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 24-December 13

Posted 13 April 2015 - 02:36 AM

Found it!
in the view /protected/extensions/upload/view/download.php, it is enough to replace the following code:
<a href="{%=file.url%}" title="{%=file.name%}" rel="gallery" download="{%=file.name%}"><img src="{%=file.thumbnail_url%}"></a>

with this:
<a href="{%=file.url%}" title="{%=file.name%}" target="_blank" rel="gallery" download="{%=file.name%}"><img src="{%=file.thumbnail_url%}" [b]width="80" height="60"[/b]></a>

that is, simply by adding: width="80" height="60"
Bye.
:rolleyes:
0

#390 User is offline   Arslan Butt 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 01-October 13
  • Location:Pakistan

Posted 21 December 2015 - 05:55 AM

how I can get file name or size in multiple upload beforeSend

'beforeSend' => 'js:function(event, files, index, xhr, handler, callBack) {

 file_name  =   files[index].name;//it gives error

}

0

#391 User is offline   JayC 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 31-March 11

Posted 15 January 2016 - 05:03 AM

I am using the XUpload extension and only allowing a single file upload. (multiple=false)
Everything works except for the following:

For some reason, it disables the file upload field after the image has been uploaded if you choose the single file upload attribute(This doesn't happen with the multiple file uploads choice).

How can I re-enable the file upload field after a file has been uploaded?
0

Share this topic:


  • (20 Pages)
  • +
  • « First
  • 18
  • 19
  • 20
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users