DMXzone Image Processor Support Product Page

Solved

db insert is working, the single file upload is not

Reported 12 Sep 2018 15:38:54
1
has this problem
12 Sep 2018 15:38:54 Glenn Williams posted:
hello tech support,

i am trying to use your DMXzone components to upload a single image file and insert its name in our database. I am following this video tutorial.

www.dmxzone.com/go/32764/dmxzone-app-connect-manual/23315/upload-a-file-and-store-its-name-into-a-database

the db insert is working, the single file upload is not.

here is my test page:

www.trclink.com/banktrainingonline/admin/cb_upload_JUNK_04.asp

the console error message is:
POST 500 ( Internal Error )
dmxAppConnect.js:7

thanks
Glenn

Replies

Replied 13 Sep 2018 07:20:55
13 Sep 2018 07:20:55 Teodor Kuduschiev replied:
Hello,
I see not errors on your page. Could you provide a screenshot of the exact error message please: prntscr.com/ktu8aa
Replied 13 Sep 2018 13:32:55
13 Sep 2018 13:32:55 Glenn Williams replied:
hello Teodor,

thank you for helping me. here are some screenshots...

i am not sure how to use your reply tools for inserting screenshots, so i am providing links to the JPG on our server instead.

each JPG is a step in the process. when i opened the developer's console and click on the error, i'm taken to the "dmxAppConnect.js" file, line 7. i saved that information in a text file that i can email to you.

www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_01.jpg

www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_02.jpg

www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_03.jpg

www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_04.jpg

www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_05.jpg

thanks,
glenn
Replied 13 Sep 2018 13:37:40
13 Sep 2018 13:37:40 Teodor Kuduschiev replied:
This is not proper file you are inspecting for error.
Open NETWORK tab in dev tools, click XHR and submit the form again. Then the asp file will show the error (500) click the asp file and check what is the error message exactly.
Replied 13 Sep 2018 18:44:56
13 Sep 2018 18:44:56 Glenn Williams replied:
Replied 14 Sep 2018 07:01:09
14 Sep 2018 07:01:09 Teodor Kuduschiev replied:
Hi Glenn,
Your third screenshot shows the error, returned by your server - maximum request length exceeded. - and this happens on files larger than a certain value.

This happens because in your server configuration this is limited. You must set the request size and file upload size on your server configuration to a larger value.
Replied 14 Sep 2018 17:48:19
14 Sep 2018 17:48:19 Glenn Williams replied:
Hello Teodor,

thank you for helping us.

this is what i am thinking of asking our host provide ( rackspace ) to increase the sever setting to.

---------------------[ start ]--------------------------------------------

server WIN IIS 7 default configuration:
Maximum Requesting Entity Body Limit to 200000000

web.config file:
maxRequestLength = "102400000"
maxAllowedContentLength = "1024000000"

---------------------[ stop ]--------------------------------------------

does that look reasonable sizes to you?

the educational goal is for the images to be used in training courses and so should not be very big. we plan to add code to prevent that. right now, i just want to be able to upload the image.

thanks,
glenn
Replied 15 Sep 2018 06:51:06
15 Sep 2018 06:51:06 Teodor Kuduschiev replied:
I still see the same error with larger images

Quotemessage: "maximum request length exceeded"


Are you sure you set this for the right site and restarted server after setting it? It is really your server limiting this, there are no limits set in the extensions.
Replied 17 Sep 2018 13:25:16
17 Sep 2018 13:25:16 Glenn Williams replied:
Hello Teodor,

here is a new link for testing, i am exposing more details on the page. hopefully, those details will help you spot the cause.

www.trclink.com/banktrainingonline/admin/cb_upload_JUNK_05.asp

I am seeing "200" on the dev's network tab ( in the broswer ) but the image file is not being uploaded. In the response, i am seeing the "upload1[ ]" but it looks empty.

our host ( rackspace ) increased the server's defaulty confirguration "Maximum Requstion Entity Body Limit to 200000000" but did not touch the web.config file. they did not see to two line items: "maxRequestLength" and "maxAllowedConstantLength".

they did not add them to the web.config file ( and so, did not set their limits ).

do they need to be web.config file for the Image Processor upload to work?

thank you for helping us.

thanks,
Glenn

Replied 17 Sep 2018 13:49:42
17 Sep 2018 13:49:42 Teodor Kuduschiev replied:
Hello Glenn,
No these changes are not usually required for image processor - that is just some strange configuration on your server ... however whatever they changed seem to have fixed the issue with the upload. I see no errors now, so the image must be posted.
Please make sure to enable output option in the file upload step, so we can see what does this step return.
Replied 17 Sep 2018 14:44:59
17 Sep 2018 14:44:59 Glenn Williams replied:
Hello Teodar,

yes, i agree. we are not getting that error now. however, the image file is still not being uploaded. the database insert still works.

here are links to new screenshots... i am exposing more details. also the output option has been enabled.

www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_01.jpg
www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_02.jpg
www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_03.jpg
www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_04.jpg
www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_05.jpg

screen shot 2 seems to suggest that the upload2 array is empty...

thank you for helping us. i feel we are close, just something on the edge is not set right ( smile ).

thanks,
Glenn


Replied 17 Sep 2018 19:19:27
17 Sep 2018 19:19:27 Glenn Williams replied:
Hello Teodar,

does this Response Header mean anything to you, in particular, the X-Powered By: ASP.NET?

Response Header:

Cache-Control: private
Content-Length:14
Content-Type:Application/json; Charset=utf-8
Date:Mon, 17 Sep 2018 19:01:06 GMT
Server:Microsoft-IIS/7.5
X-GeneratorMXzone Server Connect
X-Powered-By:ASP.NET

could that have something to do with the upload array being empty?

Preview:

{upload6: []}
upload6: []

thanks,
Glenn
Replied 18 Sep 2018 06:47:34
18 Sep 2018 06:47:34 Teodor Kuduschiev replied:
I don't think you enabled the output option for the upload step in your server action, also please enable the Throw Errors option as well.
Please provide a screenshot of your server action steps, i don't need screenshots from your browser, as i see everything in my browser console.
Replied 18 Sep 2018 14:31:16
18 Sep 2018 14:31:16 Glenn Williams replied:
Hello Teodar,

here are links to new screenshots... i am exposing more details. also the output and throw options are enabled.

www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_01.jpg
www.trclink.com/banktrainingonline/courses_cb/images/screenShot_forDMXzone/gpwErrorMessage_dmxImageProcessor_02.jpg

when i test the page (and look at the dev next preview ) the upload array is empty...

www.trclink.com/banktrainingonline/admin/cb_upload_JUNK_05.asp

thanks,
Glenn
Replied 18 Sep 2018 14:32:49
18 Sep 2018 14:32:49 Glenn Williams replied:
Hello Teodar,

fyi - you might have to clear your cache to get the two new images.

thanks,
glenn
Replied 18 Sep 2018 14:47:43
18 Sep 2018 14:47:43 Teodor Kuduschiev replied:
Now as i see your screenshot - i see the error: prntscr.com/kvubvf

You selected a wrong expression for the upload step... it must be just the {{$_POST.file}} without "name" there ...
Replied 18 Sep 2018 15:15:55
18 Sep 2018 15:15:55 Glenn Williams replied:
hello Teodor,

AWESOME, it worked.

thank you!

i still have to do some testing and refining but i feel we are moving forward again.

for now, let's keep this ticket open a little long.

thanks,
glenn
Replied 19 Sep 2018 20:33:02
19 Sep 2018 20:33:02 Glenn Williams replied:
Hello Teodor,

i am trying to build upon my success with uploading a single file and inserting a record into the database.

for now, i am focused on uploading just one file at a time. I want to be able to "re-size" the uploaded file ( so that it is the right size for the course page ) and "create a thumbnail" file ( for use else where on our site by the course builder ), then "insert a record" into the database.

is this the right video for me to follow?

www.dmxzone.com/go/32469/dmxzone-image-processor-manual/32465/upload-resize-and-create-thumbnails

i tried it but failed. my upload and insert worked, but my attempt to "re-size" and "create a thumbnail" did not. also, the "overwrite" didn't work either. I got an error message, something like "file exists already".

is there a different video i should be following?

thanks,
glenn
Replied 20 Sep 2018 15:18:28
20 Sep 2018 15:18:28 Glenn Williams replied:
Hello Teodor,

can you try this page... i have enabled "overwrite" and "throw errors". fyi, with this test page i am not inserting anything the database.

www.trclink.com/banktrainingonline/admin/cb_upload_JUNK_10.asp

the upload works ( as long as it doesn't have to overwrite anything), but the file "re-size" and "thumbnails" don't. there are plenty of error message in the dev console ( smile ) to work with and think about...

please point me in the right direction.

thanks,
glenn
Replied 20 Sep 2018 15:27:21
20 Sep 2018 15:27:21 Teodor Kuduschiev replied:
I see one huge issue on your page - you are trying to follow some old tutorial which uses HTML 5 data bindings. HTML5 Data Bindings has been replaced by App Connect ... you must only be using App Connect (no html5 data bindingsgs, no server action executors etc.)
And currently on your page you have BOTH app connect and html5 data bindings which causes even more troubles.
Replied 20 Sep 2018 18:03:44
20 Sep 2018 18:03:44 Glenn Williams replied:
hello Teodor,

ok, i will strip that code out ( and start a fresh )... no HTML 5 Data Bindings, just App Connect.

fingers crossed!

thanks,
glenn
Replied 20 Sep 2018 18:28:20
20 Sep 2018 18:28:20 Glenn Williams replied:
hello Teodor,

It is ready for you to try, for me, the upload worked but not the "re-size" and "thumbnail"

www.trclink.com/banktrainingonline/admin/cb_upload_JUNK_10.asp

i'll upload some screen shots of the code.

thanks for helping me.

thanks,
glenn
Replied 20 Sep 2018 18:50:10
20 Sep 2018 18:50:10 Glenn Williams replied:
Replied 21 Sep 2018 08:51:51
21 Sep 2018 08:51:51 Teodor Kuduschiev replied:
Hi Glenn,
Everything is working almost great except for a small thing. Your page features a single upload file field, while the action file is expecting multiple file upload field, as you are using a repeat step after the upload.
The repeat step is only required when uploading multiple files. So either remove the repeat step, after the upload step and place the rest steps there, without a repeat or make your file upload field multiple (if you need to upload multiple files).
Replied 21 Sep 2018 14:10:23
21 Sep 2018 14:10:23 Glenn Williams replied:
Hello Teodor,

can you try it now, the upload is working but the re-size and thumb nail actions are failing with the response pointing to a "Compilation Error - a resource is required to service this request"...

www.trclink.com/banktrainingonline/admin/cb_upload_JUNK_10.asp

i'll upload new screen shots of my setup soon. i removed the repeat region and unchecked the multiple.

thanks,
glenn
Replied 21 Sep 2018 14:28:06
21 Sep 2018 14:28:06 Teodor Kuduschiev replied:
This is now related to your site setup in IIS:

1. The site folder should be in the root of an IIS application folder not i a subfolder. You can convert the folder to an application folder in IIS.
2. Make sure the Bin folder is in the root of the application folder.

Reply to this topic