Jump to content

UniFileUpload issues


Wicket

Recommended Posts

Hi All,

I am having a few issues with UniFileUpload.

I have recently upgraded to latest unigui - I was previously using 1.10.0.1472 where the upload was working fine.

I am running the latest build:1.90.0.1518 and have EnableSynchronousOperations := True;

Issue 1:

Steps:

(Button only false)

1.I am calling   UniFileUpload1.Execute; from a UniToolButton - this executes and shows the Upload form. (As expected)

2. I then browse for a single file and select it (The folder browser closes as expected)

3.Then the file does not show in the list but UniFileUpload1Completed is called.

(Button only true)

Same as above however UniFileUpload1Completed is never called and the upload form does not close upon selected a single file to upload.

Issue 2:

The layout of the buttons on the upload form - how can I change this?

Please see attached gif.

I am struggling to debug this as I can not really see where the code is failing. Any ideas?

Thanks.

 

 

upload1.gif

Link to comment
Share on other sites

Yes it was - but I would expect UniFileUpload to work with it on or off.

I have come from a fairly dated build though (1472)

I've been trying to dig around to find out whats causing the issue with no luck as of yet - this is very difficult without being able to step through to the source.

Very strange. 

Link to comment
Share on other sites

I found my issue. I had some code in MainForm.Script:

"Ext.form.field.File.override(
     {onFileChange: function() {
       this.lastValue = null; // force change event to get fired even if the user selects a file with the same name
       Ext.form.field.File.superclass.setValue.call(this, this.fileInputEl.dom.value.replace(/C:\\fakepath\\/g, ''));
       }
     }
)"

From:

This worked for a long time and I forgot I even had it (I am working on a very large project). Removing this code fixed my first issue. Upgrading to ExtJS 6.7 must of broken this in some strange way.

My second issue was to do with the layout of the upload form. Do you know if I can change the layout so the buttons do no overlap when using different themes?

Bear in mind I am using EnableSynchronousOperations := True; so need to change the layout before showing the upload form.

Thanks.

 

 

 

Link to comment
Share on other sites

13 minutes ago, Wicket said:

This worked for a long time and I forgot I even had it (I am working on a very large project). Removing this code fixed my first issue.

Sorry for this...

15 minutes ago, Wicket said:

My second issue was to do with the layout of the upload form. Do you know if I can change the layout so the buttons do no overlap when using different themes?

?

Link to comment
Share on other sites

38 minutes ago, Wicket said:

That solution does not work if EnableSynchronousOperations := True;

Can you try like this for example?

  ...

  UniSession.AddJS(
    'Ext.defer(function(){'+
    '    var fWin = Ext.WindowManager.getActive();'+
    '    if (fWin) {'+
    '        fWin.setWidth(310); fWin.setHeight(178); fWin.getEl().select("a.x-btn").setTop(100);'+
    '    }'+
    '}, 200);' //200 - 400, 600, ...
  );

  UniFileUpload1.Execute;
  ...

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...