HTML5 File Upload Support Product Page
Solved
Uploading still not working correct
Reported 05 Jan 2016 21:29:23
2
have this problem
05 Jan 2016 21:29:23 MX Addict posted:
Hello DMXZone,I think you really didn't test this extension very well. It still gives me a lot of headaches.
I did follow the tutorial and I didn't get uploaded a image. So I looked in the code with IE developerstool and find some interesting things.
I have to modify this New File.asp shown as below. When sync starts there are several errors with relative and absolute paths.
<%@ LANGUAGE="JSCRIPT" CODEPAGE="65001"%>
change:
<!--#include virtual="/YourWebsite/dmxConnectLib/dmxConnect.asp" -->
to:
<!--#include file="../../dmxConnectLib/dmxConnect.asp" -->
<script runat="server" language="jscript">
change:
require.setBaseUrl('/YourWebsite/dmxConnectLib');
to:
require.setBaseUrl('/dmxConnectLib');
var app = require('lib/app');
app.define( //<<<'JSON'
{
"meta": {
"options": {
"linkedFile": "/z-upload.asp",
"linkedForm": "formUpload"
},
"$_POST": [
{
"name": "fileField",
"type": "object",
"sub": [
{
"name": "isFile",
"type": "var"
},
{
"name": "name",
"type": "var"
},
{
"name": "type",
"type": "var"
},
{
"name": "size",
"type": "var"
},
{
"name": "error",
"type": "var"
}
]
}
]
},
"exec": {
"steps": {
"name": "myFileUpload",
"module": "upload",
"action": "upload",
"options": {
"throwErrors": true,
"fields": "{{$_POST.fileField}}",
change: "path": "/YourWebsite/images"
to: "path": "/images"
},
"meta": [
"isFile",
"name",
"type",
"size",
"error"
]
}
}
}
//JSON
);
</script>
When modified I upload all the necessary folders dmxconnect and dmxconnectLib with including files to the server.
Also the files below to the Scriptlibrary folder
jquery-latest.pack.js
dmxDataBindings.js
dmxDataSet.js
dmxServerAction.js
So now I am ready for testing uploading a file. with IE developerstool (F12) And it works, Yeah. All files 200 OK
This doesn't work:
Enable the create path option (1) if you want the HTML5 File Upload to create the upload folder, if it doesn't exist on your server
"path": "/images" already created folder
"path": "/images/photo" need to be create subfolder if not exist
I get an 500 error..
So I still have huge problems with this extension.
Replies
Replied 03 Feb 2016 08:07:44
03 Feb 2016 08:07:44 Teodor Kuduschiev replied:
The upload scripts use temporary folder, which is used to temporarily store the file, until the file upload script writes it into the upload folder.
If no temp folder is set, the script uses the windows temp folder, which on your local machine most probably does not have a write permissions.
This is usually an issue on local user machines, running servers, as they are not properly configured (post size, permissions, etc.) but this is taken care of on the hosting servers.
You can set a folder on your server root or in your site folder, which has write permissions and point to it in the server connect global settings and check if this fixes your issue.
If no temp folder is set, the script uses the windows temp folder, which on your local machine most probably does not have a write permissions.
This is usually an issue on local user machines, running servers, as they are not properly configured (post size, permissions, etc.) but this is taken care of on the hosting servers.
You can set a folder on your server root or in your site folder, which has write permissions and point to it in the server connect global settings and check if this fixes your issue.
Replied 03 Feb 2016 08:27:42
03 Feb 2016 08:27:42 MX Addict replied:
Despite getting a 200 OK still no image is uploaded to the images folder all you mentioned.
Note: PAU3 works fine uploading to images folder.
Note: PAU3 works fine uploading to images folder.
Replied 03 Feb 2016 08:30:23
03 Feb 2016 08:30:23 Teodor Kuduschiev replied:
Please enable the following settings for the file upload, save and tell me what does the browser dev tools return inside the { }
Replied 03 Feb 2016 08:35:09
03 Feb 2016 08:35:09 MX Addict replied:
{"myFileUpload":{"isFile":true,"error":7,"name":"1.jpg","type":"image/jpeg","tmp_name":"C:\\inetpub\\wwwroot\\gjs\\dmxConnect\\api\\temp\\radBA47E.tmp","size":72877}}
Replied 03 Feb 2016 08:44:23
03 Feb 2016 08:44:23 Teodor Kuduschiev replied:
I assume you just entered "temp" in the temp folder settings?
Where is your temp folder actually located as this path seems to me wrong, unless you do have a temp folder in the "dmxConnect\api" folder?
The path should be relative to your server root, the same format as it is in the Path field.
Please also try leaving the temp folder setting empty to see if your windows temp folder returns an error. Then enter the right path to your temp folder on the server, as explained above.
Error 7 means, that either there is a permissions issue OR you are running out of disk space. If /tmp is size-constrained, an upload could very well fill it up.
Where is your temp folder actually located as this path seems to me wrong, unless you do have a temp folder in the "dmxConnect\api" folder?
The path should be relative to your server root, the same format as it is in the Path field.
Please also try leaving the temp folder setting empty to see if your windows temp folder returns an error. Then enter the right path to your temp folder on the server, as explained above.
Error 7 means, that either there is a permissions issue OR you are running out of disk space. If /tmp is size-constrained, an upload could very well fill it up.
Replied 03 Feb 2016 08:52:31
03 Feb 2016 08:52:31 MX Addict replied:
1. set "temp" in the temp folder
2. no api folder only contains "New File.asp"
3. leave temp folder empty. I get a 500 error:
2. no api folder only contains "New File.asp"
3. leave temp folder empty. I get a 500 error:
{"type":"Error","fileName":"modules/upload.asp","lineNumber":54,"message":"Toegang geweigerd","stack":[{"fileName":"lib/core/response.asp","lineNumber":182,"method":"error","args":[{"type":"Error","fileName":"modules/upload.asp","lineNumber":54,"message":"Toegang geweigerd","stack":[{"fileName":"modules/upload.asp","lineNumber":54,"method":"parse","args":[{"isFile":true,"error":0,"name":"1.jpg","type":"image/jpeg","tmp_name":"C:\\Windows\\Temp\\radB674A.tmp","size":72877},{"fields":{"isFile":true,"error":0,"name":"1.jpg","type":"image/jpeg","tmp_name":"C:\\Windows\\Temp\\radB674A.tmp","size":72877},"path":"C:\\inetpub\\wwwroot\\gjs\\images","throwErrors":true,"overwrite":false,"createPath":true}]},{"fileName":"modules/upload.asp","lineNumber":26,"method":"upload","args":[{"fields":{"isFile":true,"error":0,"name":"1.jpg","type":"image/jpeg","tmp_name":"C:\\Windows\\Temp\\radB674A.tmp","size":72877},"path":"C:\\inetpub\\wwwroot\\gjs\\images","throwErrors":true,"overwrite":false,"createPath":true},"myFileUpload"]},{"fileName":"lib/app.asp","lineNumber":77,"method":"_exec","args":[{"name":"myFileUpload","module":"upload","action":"upload","options":{"fields":"{{$_POST.fileField}}","path":"/images","throwErrors":true},"meta":["isFile","name","type","size","error"],"output":true}]},{"fileName":"lib/app.asp","lineNumber":51,"method":"exec","args":[{"steps":{"name":"myFileUpload","module":"upload","action":"upload","options":{"fields":"{{$_POST.fileField}}","path":"/images","throwErrors":true},"meta":["isFile","name","type","size","error"],"output":true}}]},{"fileName":"lib/app.asp","lineNumber":45,"method":"define","args":[{"meta":{"options":{"linkedFile":"/z-upload.asp","linkedForm":"formUpload"},"$_POST":[{"name":"fileField","type":"object","sub":[{"name":"isFile","type":"var"},{"name":"name","type":"var"},{"name":"type","type":"var"},{"name":"size","type":"var"},{"name":"error","type":"var"}]}]},"exec":{"steps":{"name":"myFileUpload","module":"upload","action":"upload","options":{"fields":"{{$_POST.fileField}}","path":"/images","throwErrors":true},"meta":["isFile","name","type","size","error"],"output":true}}}]}],"step":{"name":"myFileUpload","module":"upload","action":"upload","options":{"fields":"{{$_POST.fileField}}","path":"/images","throwErrors":true},"meta":["isFile","name","type","size","error"],"output":true}}]},{"fileName":"modules/upload.asp","lineNumber":26,"method":"upload","args":[{"fields":{"isFile":true,"error":0,"name":"1.jpg","type":"image/jpeg","tmp_name":"C:\\Windows\\Temp\\radB674A.tmp","size":72877},"path":"C:\\inetpub\\wwwroot\\gjs\\images","throwErrors":true,"overwrite":false,"createPath":true},"myFileUpload"]},{"fileName":"lib/app.asp","lineNumber":77,"method":"_exec","args":[{"name":"myFileUpload","module":"upload","action":"upload","options":{"fields":"{{$_POST.fileField}}","path":"/images","throwErrors":true},"meta":["isFile","name","type","size","error"],"output":true}]},{"fileName":"lib/app.asp","lineNumber":51,"method":"exec","args":[{"steps":{"name":"myFileUpload","module":"upload","action":"upload","options":{"fields":"{{$_POST.fileField}}","path":"/images","throwErrors":true},"meta":["isFile","name","type","size","error"],"output":true}}]},{"fileName":"lib/app.asp","lineNumber":45,"method":"define","args":[{"meta":{"options":{"linkedFile":"/z-upload.asp","linkedForm":"formUpload"},"$_POST":[{"name":"fileField","type":"object","sub":[{"name":"isFile","type":"var"},{"name":"name","type":"var"},{"name":"type","type":"var"},{"name":"size","type":"var"},{"name":"error","type":"var"}]}]},"exec":{"steps":{"name":"myFileUpload","module":"upload","action":"upload","options":{"fields":"{{$_POST.fileField}}","path":"/images","throwErrors":true},"meta":["isFile","name","type","size","error"],"output":true}}}]}]}
Replied 03 Feb 2016 08:58:39
03 Feb 2016 08:58:39 MX Addict replied:
I give C:/windows/temp read/write permissions.
Image is uploaded to images folder. But when I click on the uploaded image I get read/write permission problems.
Image is uploaded to images folder. But when I click on the uploaded image I get read/write permission problems.
Replied 03 Feb 2016 09:01:51
03 Feb 2016 09:01:51 MX Addict replied:
Do I need to fill in absolute path in Temp folder settings or only "temp"
Replied 03 Feb 2016 09:02:23
03 Feb 2016 09:02:23 Teodor Kuduschiev replied:
From what i see in your error message it says "Access Denied" which means the Windows Temp folder does not have write permissions.
If you just write "temp" in the temp folder path, it will be relative to your server connect action file, which means it will look for "temp" folder in the "dmxConnect\api" folder.
Your temp folder path should be the same format as your upload folder path is.
If your upload path in the extension UI is: C:\\inetpub\\wwwroot\\gjs\\images
Then your temp folder path should also be: C:\\inetpub\\wwwroot\\temp (if it is in the wwwroot folder)
Or just set proper permissions to your Windows temp folder
If you just write "temp" in the temp folder path, it will be relative to your server connect action file, which means it will look for "temp" folder in the "dmxConnect\api" folder.
Your temp folder path should be the same format as your upload folder path is.
If your upload path in the extension UI is: C:\\inetpub\\wwwroot\\gjs\\images
Then your temp folder path should also be: C:\\inetpub\\wwwroot\\temp (if it is in the wwwroot folder)
Or just set proper permissions to your Windows temp folder
Replied 03 Feb 2016 09:24:56
03 Feb 2016 09:24:56 MX Addict replied:
Hi Teodor,
It works like you mentioned. File is uploaded to images folder
C:\\inetpub\\wwwroot\\temp
Confusion under Server Connect is global settngs.
Instead of Temp folder maybe it is better to write absolute path to Temp folder. And maybe to publish in the manual.
Thanks anyway for your support
It works like you mentioned. File is uploaded to images folder
C:\\inetpub\\wwwroot\\temp
Confusion under Server Connect is global settngs.
Instead of Temp folder maybe it is better to write absolute path to Temp folder. And maybe to publish in the manual.
Thanks anyway for your support
Replied 03 Feb 2016 09:31:28
03 Feb 2016 09:31:28 Teodor Kuduschiev replied:
As i mentioned, if your server is properly configured, you do not need to change it, as the script will use the Windows temp folder.
Absolute paths cannot be used, as parent paths are not allowed on most of the windows servers for security reasons.
I am glad to hear that all works fine now on your local server.
Absolute paths cannot be used, as parent paths are not allowed on most of the windows servers for security reasons.
I am glad to hear that all works fine now on your local server.
Replied 03 Feb 2016 09:54:38
03 Feb 2016 09:54:38 MX Addict replied:
Hi Teodor,
With the path C:\\inetpub\\wwwroot\\temp under global settings everything local works fine.
Now I leave global settings temp empty:
The temp folder under windows has read/write permission.The file is uploaded to the images folder C:\\inetpub\\wwwroot\\gjs\\images but now the file itselfs has read/write permission problems.
How does I fix this with the properly server configuration?
With the path C:\\inetpub\\wwwroot\\temp under global settings everything local works fine.
Now I leave global settings temp empty:
The temp folder under windows has read/write permission.The file is uploaded to the images folder C:\\inetpub\\wwwroot\\gjs\\images but now the file itselfs has read/write permission problems.
How does I fix this with the properly server configuration?
Replied 03 Feb 2016 10:05:28
03 Feb 2016 10:05:28 Teodor Kuduschiev replied:
Can you explain more detailed, what are the files problems exactly? And where do you see these problems? (how to reproduce it here)
Replied 03 Feb 2016 10:17:56
03 Feb 2016 10:17:56 MX Addict replied:
Under Server Connect
Global settings:
Temp folder: <empty>
Script timeout: <empty>
Temp folder under windows has read/write permission
I upload a file which succeed and I want to view the file in the folder C:\inetpub\wwwroot\gjs\images
I won't view because of read/write error:
Global settings:
Temp folder: <empty>
Script timeout: <empty>
Temp folder under windows has read/write permission
I upload a file which succeed and I want to view the file in the folder C:\inetpub\wwwroot\gjs\images
I won't view because of read/write error:
Replied 03 Feb 2016 11:37:38
03 Feb 2016 11:37:38 Teodor Kuduschiev replied:
Can you tell me what is the exact error message that you see in English?
Also - if you move the file to another location - is it possible to open it?
Also - if you move the file to another location - is it possible to open it?
Replied 03 Feb 2016 11:59:26
03 Feb 2016 11:59:26 MX Addict replied:
When doubleclick on the uploaded file in the folder C:\inetpub\wwwroot\gjs\images
Access denied you need read permissions.
When copy/paste outside the folder to my desktop I need to give admin read permissions to the file and then I can open the file.
Access denied you need read permissions.
When copy/paste outside the folder to my desktop I need to give admin read permissions to the file and then I can open the file.
Replied 03 Feb 2016 12:29:22
03 Feb 2016 12:29:22 Teodor Kuduschiev replied:
This is also related to the Windows Temp folder permissions, as the file inherits the temp folder permissions, when copied to your upload folder.
You need to properly set permissions for your user(s) to the Windows temp folder or just use the inetpub temp folder, where you are sure it has the right permissions.
You need to properly set permissions for your user(s) to the Windows temp folder or just use the inetpub temp folder, where you are sure it has the right permissions.
Replied 03 Feb 2016 12:38:26
03 Feb 2016 12:38:26 MX Addict replied:
Ok, thats the trick.
read/write permissions to IIS_IUSRS and uploading works fine now and no permission in the images folder.
Thank Teodor
read/write permissions to IIS_IUSRS and uploading works fine now and no permission in the images folder.
Thank Teodor