File Attachment Control could not be uploaded.

  • 3 February 2016
  • 6 replies
  • 25 views

Badge +1

I add condition "if control contain a value" and "if control not contain a value" but messege show "control not contain a value". So I looked at Chrome brower by debug function network. Image preview file could be uploaded in to server but image file attachment is empty. I looked link of network tab was show "Server:81/Runtime/Utilities/FileHandler.ashx?fn=(image file)" when I cilcked link that I saw "The file could not be uploaded. Unforseen error occured on the file upload, contact your administrator." and when I drag drop file control error "Uncaught TypeError: Cannot read property 'apply' of undefined."  I'm not sure that set config server is wrong? but I looked in to server web.config file can large file 16 MB and runtime is so much. I have no idea. Please help.


15725iEC271A06842F9AB6.png
16459i66C0F111200DF19F.png
13861i4743745770F89E7B.png

6 replies

Badge +7

Hi  @yungying, 


 


 


File Attachmnent Control:


Make sure you have the property configured correct. 


1) Is the picture you attempted to upload within the file size allowed?


You mention that you have web.config set so you can upload up to 16MB did you update the max request length?


The value of the Max Size property should always be lesser or equal to the value of the MaxRequestLength setting in the
<install drive>:Program Files (x86)K2 blackpearlK2 smartforms DesignerWeb.config and
<install drive>:Program Files (x86)K2 blackpearlK2 smartforms RuntimeWeb.config. If you want the Max Size to be more than 16 MB, you’ll have to change the MaxRequestLength


 


 


2) Is the picture an allowed file type?


Represents specific types of files allowed for each individual control. Examples include jpg,gif or pdf,docx. Separate multiple file types with a comma.


webconfig02.png


 


3) By default, users are not able to upload or download files with the File Attachment control, Image Attachment control or Picture control when using a Form configured for Anonymous Access.


 


 


If this does not help, please provide more detailed information about your view and form.


 


Thanks


Chad


 

Badge +1

Hi  @Chadg,

 

1)  I upload file about 1 MB. I think that within limited.

 

2) This is problem. My view have no allow file type. What should I do?

13714i469FB92EA7B3D908.png

 

5) When I used Save as PDF Control I can do it. I looked database table have data and I tried generate list view by choose smartobject. I can see link of list view is created by Save as PDF.

 

 Thanks

yungying

 

 

Badge +7

@yungying, 


 


 


What version of K2 are you running?


 


Chad

Badge +1

My K2 version that

K2 blackpearl 4.6.11 (4.12060.1731.1)
K2 smartforms 4.6.11 (4.12165.1732.1)
K2 smartforms Control Pack 4.6.11 (4.13180.1733.1)

Windows Server 2008 R2

Badge +7

@yungying, 


 


This is strange behavior indeed.  I think you may need to log a ticket with K2 support.


 


Chad

Badge +1

Thank you very much for support.

yungying

 

Reply