[SOLVED] Upload problem

Talk about Image/File fields (uploading, problems etc.)

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

yudthaphon
Junior
Junior
Posts: 24
Joined: Nov 2nd, '09, 14:29

[SOLVED] Upload problem

Postby yudthaphon » Apr 22nd, '11, 10:34

Dear Administrator
I use PHP DataGrid Pro (AJAX enabled) version 6.4.1. with a web hosting (Window IIS).
I would like to have your suggestion. I try to upload a file in edit mode (after browse..) and get warning like this.

Warning: move_uploaded_file(fileupload/20110422_182631.pdf) [function.move-uploaded-file]: failed to open stream: Permission denied in C:\Inetpub\vhosts\prodigi.co.th\httpdocs\teleDocument\datagrid\datagrid.class.php on line 6670

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\Temp\phpE70.tmp' to 'fileupload/20110422_182631.pdf' in C:\Inetpub\vhosts\prodigi.co.th\httpdocs\teleDocument\datagrid\datagrid.class.php on line 6670

I wrote a code to upload field (file) like this:
View Mode Settings:
"pdf" =>array("header"=>" ไฟล์", "type"=>"link", "align"=>"left", "width"=>"5%", "wrap"=>"wrap", "text_length"=>"-1", "tooltip"=>"true", "tooltip_type"=>"floating", "case"=>"normal", "summarize"=>"false", "sort_type"=>"string", "sort_by"=>"", "visible"=>"true", "on_js_event"=>"", "field_key"=>"pdf", "field_data"=>"pdf", "rel"=>"", "title"=>"", "target"=>"_blank", "href"=>"fileupload/{0}"),

Add/Edit/Details Mode Settings:
"pdf" =>array("header"=>" ไฟล์ ไม่เกิน 10MB", "type"=>"file", "req_type"=>"sy", "width"=>"210px", "title"=>"", "readonly"=>"false", "maxlength"=>"-1", "default"=>"", "unique"=>"false", "unique_condition"=>"", "visible"=>"true", "on_js_event"=>"", "target_path"=>"fileupload/", "max_file_size"=>"10M", "file_name"=>date("Ymd_His"), "host"=>"local", "allow_downloading"=>"true", "allowed_extensions"=>""),

Please suggest possible solution so I could fix it.

Thank you very much.
yudthaphon
Last edited by yudthaphon on Apr 25th, '11, 06:36, edited 1 time in total.

administrator
Site Admin
Site Admin
Posts: 5992
Joined: Jan 7th, '09, 23:18
Contact:

Re: Upload problem

Postby administrator » Apr 24th, '11, 09:10

You have to grant write permissions to destination folder.
On windows, you have to share this folder.
Please read here how to do this:
http://www.boyce.us/windows/tipcontent.asp?ID=397

yudthaphon
Junior
Junior
Posts: 24
Joined: Nov 2nd, '09, 14:29

Re: [SOLVED] Upload problem

Postby yudthaphon » Apr 25th, '11, 06:36

Thank you very much..
YV.


Return to “Field type: "image/file"”