Yii Framework Forum: EAjaxUpload Extension - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

EAjaxUpload Extension Issues with operation Rate Topic: -----

#21 User is offline   hellboy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 12-July 11

Posted 19 August 2011 - 03:52 AM

View Postkosenka, on 02 June 2011 - 01:17 PM, said:

EAjaxUpload does not work with the database.
You must self to write code to save the file name in the database.


Is there sample how to use EAjaxUpload with model/database?
1

#22 User is offline   shizo971 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 13-February 11
  • Location:Guadeloupe

Posted 10 September 2011 - 12:09 PM

Someone can help me to return the filename & filesize in the view plz, in order to save it into a database.
i don't know how to return these values.

best regards.
1

#23 User is offline   Giacomo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 69
  • Joined: 03-October 12

Posted 16 November 2012 - 10:34 AM

View Postkosenka, on 02 June 2011 - 02:33 PM, said:

The widget transfers the file name to the controller. Look at the example of the controller here http://www.yiiframew...on/eajaxupload/


Hi, inside the handleUpload function, i've renamed the file before save it. But inside onComplete,

'onComplete'=>"js:function(id, fileName, responseJSON){ alert(fileName); }",
the fileName displayed is the original one, not the changed one. How to retrieve the new filename assigned before saving? Thank you!
0

#24 User is offline   Jonauz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 16-March 13

Posted 16 March 2013 - 10:18 AM

Hi,
I'm new in Yii, straggling with EAjaxUpload extension. I keep getting "image.png 1.2kB Failed" on upload.
In console it shows:
POST http ://localhost/testdrive/index.php?r=controller/upload&PHPSESSID=&YII_CSRF_TOKEN=64cdd116e7f456ce0257dc5b86d55da437e74cd5&qqfile=image.png 404 (Not Found) fileuploader.js:1204
qq.extend._upload fileuploader.js:1204
qq.UploadHandlerAbstract.upload fileuploader.js:892
qq.FileUploaderBasic._uploadFile fileuploader.js:397
qq.FileUploaderBasic._uploadFileList fileuploader.js:388
qq.FileUploaderBasic._onInputChange fileuploader.js:372
qq.UploadButton.onChange fileuploader.js:309
(anonymous function) fileuploader.js:825

Checked all max files sizes allowed many times, seems fine, php.ini has 32MB allowed.

My "uploads" directory is in "WebRoot/testdrive/uploads/" with
$folder=Yii::app()->request->baseUrl.'/uploads/';

I'm using simplest steps as a base from here:
http ://www.yiiframework.com/doc/guide/1.1/en/quickstart.first-app
And adding functionality to send an image to server with this tool and simplest way it is written there:
http ://www.yiiframework.com/extension/eajaxupload/

Can't make it work, I would appreciate any help.
Thanks
0

#25 User is offline   scheriff 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 20-March 13

Posted 21 March 2013 - 07:49 AM

hi,
I am trying to implement this extension. I have successfully uploaded files using the demo application in framework's guide. But in my original app I am getting "No files were uploaded" error. $_GET and $_FILES seem to be empty. I thought it is about using urlformat = 'path'. To try that out I changed demo app's setting to use 'path' and that worked. Is there any other idea what might cause this problem? I have also read some posts about CSRF token being invalid in GET requests but I don't think that's the reason

any help will be appreciated
0

#26 User is offline   Kaushik Mohanraj 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 11-July 12
  • Location:India

Posted 15 May 2013 - 06:16 AM

Hi,

Is there a way to change the file name prior to uploading the image to the server ??
Or is the ambitious file name handled at some stage other than the OS handling ???

Regards,
Kaushik
New and Learning ....
... Wish to go across the rough tides and reach the Pinnacle !!!
0

#27 User is offline   Kaushik Mohanraj 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 11-July 12
  • Location:India

Posted 15 May 2013 - 06:31 AM

View PostKaushik Mohanraj, on 15 May 2013 - 06:16 AM, said:

Hi,

Is there a way to change the file name prior to uploading the image to the server ??
Or is the ambitious file name handled at some stage other than the OS handling ???

Regards,
Kaushik


I found the solution to this on the following link:
http://stackoverflow...upload-with-yii ( Find this in the answers)

This line allows you to rename the file which is being uploaded:

rename($folder.$result['filename'],$folder."newfilename");
New and Learning ....
... Wish to go across the rough tides and reach the Pinnacle !!!
0

#28 User is offline   carton 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 27-February 13

Posted 12 August 2013 - 11:46 AM

Hi all :)
did someone found the way to pass filenames to DB?
Right now i'm sending them from a form but the problem is that i cannot concat them together. The last replace all the previous.
Maybe someone have a better idea to pass them to controller and then process them?
Thank you since now :)
0

#29 User is offline   JoelTheBeer 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 09-October 13

Posted 09 October 2013 - 03:36 PM

Quote

Hi,
I'm new in Yii, straggling with EAjaxUpload extension. I keep getting "image.png 1.2kB Failed" on upload.
In console it shows:
POST http ://localhost/testdrive/index.php?r=controller/upload&PHPSESSID=&YII_CSRF_TOKEN=64cdd116e7f456ce0257dc5b86d55da437e74cd5&qqfile=image.png 404 (Not Found) fileuploader.js:1204
qq.extend._upload fileuploader.js:1204
qq.UploadHandlerAbstract.upload fileuploader.js:892
qq.FileUploaderBasic._uploadFile fileuploader.js:397
qq.FileUploaderBasic._uploadFileList fileuploader.js:388
qq.FileUploaderBasic._onInputChange fileuploader.js:372
qq.UploadButton.onChange fileuploader.js:309
(anonymous function) fileuploader.js:825

Checked all max files sizes allowed many times, seems fine, php.ini has 32MB allowed.

My "uploads" directory is in "WebRoot/testdrive/uploads/" with

$folder=Yii::app()->request->baseUrl.'/uploads/';


I'm using simplest steps as a base from here:
http ://www.yiiframework.com/doc/guide/1.1/en/quickstart.first-app
And adding functionality to send an image to server with this tool and simplest way it is written there:
http ://www.yiiframework.com/extension/eajaxupload/

Can't make it work, I would appreciate any help.
Thanks


Hey, did you ever get this fixed cause I am having the same problem :/
Let me know :)
thanks :)
0

#30 User is offline   two_pizza 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 09-May 14

Posted 09 May 2014 - 03:51 PM

View PostJoelTheBeer, on 09 October 2013 - 03:36 PM, said:

Hey, did you ever get this fixed cause I am having the same problem :/
Let me know :)
thanks :)


I have good and bad news. To solve you problem you have to change string in you view:

'action'=>Yii::app()->createUrl('controller/upload'),


insted 'controller' paste name of controller wich you use.

Also if you get 403 you have to add actionUpload to validation rules:

public function accessRules()
	{
		return array(
			array('allow',  // allow all users to perform 'index' and 'view' actions
				'actions'=>array('index','view','upload'),
				'users'=>array('*'),
			),
............


Bad news - its still doesnt work....
0

#31 User is offline   ghadfrf 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 13-May 14

Posted 26 June 2014 - 07:09 AM

View Posttwo_pizza, on 09 May 2014 - 03:51 PM, said:

I have good and bad news. To solve you problem you have to change string in you view:

'action'=>Yii::app()->createUrl('controller/upload'),


insted 'controller' paste name of controller wich you use.

Also if you get 403 you have to add actionUpload to validation rules:

public function accessRules()
	{
		return array(
			array('allow',  // allow all users to perform 'index' and 'view' actions
				'actions'=>array('index','view','upload'),
				'users'=>array('*'),
			),
............


Bad news - its still doesnt work....

0

#32 User is offline   ghadfrf 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 13-May 14

Posted 26 June 2014 - 07:10 AM

Even i am having the same issue image uploading gets the failed message,still not able to correct error,please do reply if any one has the solution for this.Struggling from two days.
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • 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