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

Jump to content

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

[Extension] Xupload Rate Topic: ***** 1 Votes

#341 User is offline   Abdul Rehman 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 19-February 11

Posted 25 June 2013 - 04:09 PM

View Postwisper, on 05 June 2013 - 11:40 PM, said:

Same question


See Post # 331 by wainguo
http://www.yiiframew...post__p__200466
0

#342 User is offline   rosinghal 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 05-March 13
  • Location:India

Posted 26 June 2013 - 02:41 AM

Can i show images uploaded on update?
Xtendify - A marketplace for plugins and themes.
0

#343 User is offline   lukBB 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 45
  • Joined: 08-December 10

Posted 01 July 2013 - 08:38 AM

Hi There!!

Thank You for great extension Asgaroth. I managed to upload files to the server with additional data. I added radio button to indicate default image(main image) shown in list view. All works great except one situation. After I add few images, I choose one main image via radio button, and start upload - I have expected result. But if before submitting the form I'will add again additional files I have another radio button, and can choose second main image. And this is the problem. I'd like to somehow remeber in my form that there is only one possible radio button to choose, and in case someone add files few times, will not be able to mark radio button if already marked. Or just block add files button after files are uploaded.

I belive this can be easily solve by JS but I don't have enough skills :/
If anyone could help will be great
Thanks in advance
Regards

lukBB
0

#344 User is offline   mentorq 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 105
  • Joined: 26-June 13

Posted 03 July 2013 - 02:33 AM

Hi ;)

I need help. I'm using
$secureFileNames = true; 


After uploading file I want to sent to DB new genereted name and give it ID, proper description and url directly to file. Where should I start? I really need some guidance ;)
0

#345 User is offline   MisterD 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 03-June 13

Posted 11 July 2013 - 11:09 AM

Hey guys, im having a hard time with the CSRF Validation.

Every time I submit de upload's im getting Invalid CSRF Token.

Any ideas?
0

#346 User is offline   mentorq 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 105
  • Joined: 26-June 13

Posted 18 July 2013 - 05:20 AM

View Postmentorq, on 03 July 2013 - 02:33 AM, said:

Hi ;)

I need help. I'm using
$secureFileNames = true; 


After uploading file I want to sent to DB new genereted name and give it ID, proper description and url directly to file. Where should I start? I really need some guidance ;)


Still no idea, I just need info what should I do.
0

#347 User is offline   qiansen1386 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 54
  • Joined: 03-May 13

Posted 18 July 2013 - 08:16 PM

Could any one tell me what is composer, and do we have to use it?
Since Yii has already provided a autoload feature. what's the point of using this one?
Sorry for asking that, i am a newbie and really ignorance.
0

#348 User is offline   TobiasB 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 13-August 13

Posted 13 August 2013 - 02:34 AM

Hi, im new to Yii and this extension and i've got the following problem: Is there a way to loop through all the files a user has uploaded (this is what i want to do in the controller) ? I need to store the filepath and the user_id manually in a db.

My Controller:
public function actions() 
	{
		return array('upload2' => array(
				'class' => 'xupload.actions.XUploadAction', 
				'path' => Yii::app() -> getBasePath() . "/../data/uploads", 
				"publicPath" => Yii::app()->getBaseUrl()."/data/uploads" ), 
			);
	}
...

public function actionUpload()
	{
		
		Yii::import("xupload.models.XUploadForm");
		$model = new XUploadForm;
		
		$model->file = CUploadedFile::getInstance( $model, 'file' );
		
		$this->render('upload', array('model' => $model, ));	
	}


My view (upload.php)
$this->widget('xupload.XUpload', array(
	'url' => Yii::app()->createUrl("check/upload2", array("parent_id" => 1)),
	'model' => $model,
	'attribute' => 'file',
	'multiple' => true,
));


Thanks for advice
Tobias


__ Problem solved __

This post has been edited by TobiasB: 27 August 2013 - 06:16 AM

0

#349 User is offline   circus19 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 08-July 11

Posted 04 September 2013 - 02:15 PM

Hello,

I'm having an odd issue with xupload applying tooltips to a dateRangeRow which breaks the date selection. The dateRangeRow appears to use the "title" attribute for finding the value but with the tooltip, the "title" gets wiped out. Here's an example (from Chrome) of a date option where I disable the xupload widget and when I have it enabled.

Disabled (so the dateRangeRow works) : <td class="available in-range" title="r3c2">17</td>
Enabled (broken) : <td class="available in-range" title aria-describedby="ui-tooltip-140">17</td>

I've gone through disabling different js and css files but I'm still not having any luck. The only way I can have the dateRangeRow work properly is to completely comment out the inclusion of the xupload widget (which is obviously not the ideal solution).

Any ideas?

----

Note -- I switched from yiibooster to yiistrap/yiiwheels and it seems to all work well now.
0

#350 User is offline   rundll 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 28-April 13

Posted 12 September 2013 - 06:53 PM

Hi Asgaroth I'm new to yii and I am having problem transferring the files addImage method in SomeModel model the first loop is not being uploaded it remain being in tmp folder but the other images had been uploaded.. please help..thnx
0

#351 User is offline   agus kianto 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 07-January 13

Posted 26 September 2013 - 03:13 AM

Hi Asgaroth,

I am trying to use Xupload but I got this error: SyntaxError: JSON.parse: unexpected character.

What should I check?

Regards,

Agus Kianto
0

#352 User is offline   syzv 

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

Posted 06 October 2013 - 08:02 PM

hola, necesito utilizar la librería mostrando una primera foto (pre-cargada), y que al hacer clic sobre en delete elimine la foto y permita cargar otra (funcionamiento normal de la librería), el problema es que no entiendo como pasar el parámetro para que muestre una imagen pre-cargada(ruta en BBDD) ya con el botón delete, antes de cargar una primera.


Gracias de antemano por su ayuda!!!!
0

#353 User is offline   carlosmcv 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 19-November 11

Posted 26 October 2013 - 04:34 PM

Hi,

How can I preload (in Xupload) an image from database previosly uploaded with Xupload.

I'm doing what is explained here: http://www.yiiframew...pload-workflow/

I have a model (ex. Person model ) with an image attribute.

Step 1: create a new Person, so I call person/create action and render the create form.
Step 2: fill the Person fields and load an Image using the Xupload extension.
Step 3: Save it in database.

Step 4: edit my previosly created model Post, so I call person/update and render the update form.

What I need is to display the image associated to this model, so I can edit it using the Xupload extension.

Have you any idea how can I do this?

Thanks in advance.
Carlos
0

#354 User is offline   carlosmcv 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 19-November 11

Posted 27 October 2013 - 12:22 PM

View Postwainguo, on 09 April 2013 - 03:16 AM, said:

another sol as the original example did:

just add this *js* to your view( the view where you add this *widget*)
<script type="text/javascript">
    $(function () {
        'use strict';

        // Initialize the jQuery File Upload widget:
        $('#XUploadForm-form').fileupload({
            url: 'getphotos/'
        });

        $.ajax({
            url: $('#XUploadForm-form').fileupload('option', 'url'),
            dataType: 'json',
            context: $('#XUploadForm-form')[0]
        }).done(function (result) {
            $(this).fileupload('option', 'done')
                    .call(this, null, {result: result});
        });
    });
</script>


and create an action like actionGetphotos as above url specified, the action collect the images data, and response json content as the download view expected.

that's all.


Hi,


it works for me, thank you. I have another question:

I set 'multiple' => false. This way when I preload my image I need to Disable the button to avoid looking for other pictures. And enable it when I delete the current picture.

I think I have to write something else in the previous code:

<script type="text/javascript">
    $(function () {
        'use strict';

        // Initialize the jQuery File Upload widget:
        $('#XUploadForm-form').fileupload({
            url: 'getphotos/'
        });

        $.ajax({
            url: $('#XUploadForm-form').fileupload('option', 'url'),
            dataType: 'json',
            context: $('#XUploadForm-form')[0]
        }).done(function (result) {
            $(this).fileupload('option', 'done')
                    .call(this, null, {result: result});

            // HAVE TO WRITE SOMETHING ELSE HERE, BUT I DON'T KNOW WHAT !!!!!!!!!!!!!
 
        });
    });
</script>


Thanks in adavance.
0

#355 User is offline   zealotcik 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 19-November 12

Posted 29 October 2013 - 03:13 PM

Hi guys

Got a question about this awesome plugin. How to execute some javascript after ALL files are uploaded?
Example: you're uploading 7 files -> on submit you add some waiter, when ALL files are loaded you hide waiter.

Any ideas?

Best.
0

#356 User is offline   prasuton 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 13-July 13

Posted 04 November 2013 - 04:39 AM

i'll reload page, by F5 button, all generated images preview, disappear.

I want display their again, after page refresh.

i' try this code but not working
<script type="text/javascript">
    $(function () {
        'use strict';

        // Initialize the jQuery File Upload widget:
        $('#XUploadForm-form').fileupload({
            url: 'getphotos/'
        });

        $.ajax({
            url: $('#XUploadForm-form').fileupload('option', 'url'),
            dataType: 'json',
            context: $('#XUploadForm-form')[0]
        }).done(function (result) {
            $(this).fileupload('option', 'done')
                    .call(this, null, {result: result});
        });
    });
</script>

What to do in this case?
0

#357 User is offline   TobiasB 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 13-August 13

Posted 04 November 2013 - 06:49 AM

Hi,

Is there a way to redirect the browser after _all_ selected files are being uploaded ?

Thanks
0

#358 User is offline   TobiasB 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 13-August 13

Posted 04 November 2013 - 09:34 AM

Or is it possible to display a message when the upload is done ?
0

#359 User is offline   zealotcik 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 19-November 12

Posted 12 November 2013 - 01:43 PM

View Postprasuton, on 04 November 2013 - 04:39 AM, said:

i'll reload page, by F5 button, all generated images preview, disappear.

I want display their again, after page refresh.

i' try this code but not working
<script type="text/javascript">
    $(function () {
        'use strict';

        // Initialize the jQuery File Upload widget:
        $('#XUploadForm-form').fileupload({
            url: 'getphotos/'
        });

        $.ajax({
            url: $('#XUploadForm-form').fileupload('option', 'url'),
            dataType: 'json',
            context: $('#XUploadForm-form')[0]
        }).done(function (result) {
            $(this).fileupload('option', 'done')
                    .call(this, null, {result: result});
        });
    });
</script>

What to do in this case?


I think you should do any action with ajax (url is upload action I guess), so with upload action you should send array to view and then render it. Still - it should work only with single file. To multiple files, got the same question :)
0

#360 User is offline   yusron 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 24-November 10
  • Location:Jakarta, Indonesia

Posted 27 November 2013 - 02:27 AM

I want to use the extension xupload. but i have a problem when uploading files

Posted Image


my controller IdentityController.php
        public function actions() {
                return array('upload' => array(
                                'class' => 'xupload.actions.XUploadAction',
                                'path' => Yii::app()-> getBasePath(). "/../images/uploads",
                                "publicPath" => Yii::app()->getBaseUrl()."/images/uploads" ),
                 );
        }


        public function actionCreate()
        {
                $model= new Identity;
                $model2 = new XUploadForm;

                if(isset($_POST['Identity']))
                {
                        $model->attributes=$_POST['Identity'];
                        if($model->save())
                                $this->redirect(array('index'));
                }

              $this->render('create',array(
                        'model'=>$model,'model2'=>$model2
                ));
        }







assume in create.php, i have added attribute $model2 (from controller)
my view _form.php

                <?php 
                  $this->widget('xupload.XUpload', array(
                        'url' => Yii::app()->createUrl("identity/upload"),
                        'model' => $model2,
                        'name'=>'filenpwp',
                        'multiple' => true,
                ));
                ?>

dieng plateau - Abode of The Gods http://pemudapemalan...-para-dewa.html

About me - http://yusron.net
0

Share this topic:


  • (20 Pages)
  • +
  • « First
  • 16
  • 17
  • 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