close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

File type recognition

Thread began 10/20/2009 1:12 pm by martin389853 | Last modified 10/21/2009 5:46 pm by martin389853 | 1678 views | 5 replies |

martin389853

File type recognition

Hi there,

If you were to set the DFP to accept only certain file types (I believe the choice is either web safe images or any file type at the moment) should I expect an alert message if the wrong file type is chosen. At the moment if I choose to upload a psd file for instance, the browser just goes to upload and crashes (or at least, doesn't seem to do anything else for an inexorable amount of time).

Sign in to reply to this post

Eric Mittman

It the problem is the amount of time that it takes to see any result then the issue is likely a timeout problem. This can occur as a result of the size of the upload since the checks on the file type do not occur until the file has been uploaded to it's temporary location on the server.

On your page you can expand the bindings for the file upload and put the full debugging binding on the page then run the test again. It should let you know if there is an error with the upload.

If the problem is just a timeout issue you can increase the execution time either by updating the php.ini file or by adding in this code to the page:

php:
<?php

set_time_limit
(<number of seconds to increase time limit by>);
?>
Sign in to reply to this post

martin389853

Thanks for reply. It's not the time it took but I'll use that snippet, thnx. The problem is just that I will have clients uploading the wrong thing by mistake and will end up pressing the submit button several times (the progress bar doesn't work and doesn't seem to be resolvable but I have used some javascript to disable and rename the submit button while it is processing) or closing their browsers and starting again etc etc. Eventually they will just opt out because its too much hastle.

The 'time it takes' and the fact that you can't identify errors until the file has already uploaded was one of the problems I had with my own image uploading script but atleast mine came back with the reasons for failure to upload such as wrong file type etc. I'm not getting any message from your script and it leaves me more than a little in the dark. My clients will just think I haven't written the web page properly, dislike me for waisting their time and leave.

Are there any results from the upload that I should be recieving and am just failing to see? Also, are there occasions when a file won't upload other than time out, for instance maximum file size etc? I just ask because my smaller jpg files are loading up fine but the larger ones are taking their due time to process and then don't exist.

Sign in to reply to this post

martin389853

You've maxed the file size to 2mb haven't you?

Sign in to reply to this post

Eric Mittman

The script does not limit based on file size, the max upload file size is set in the php.ini file for the upload_max_filesize setting.

There is more info on this setting on the php page:

ini.core.php

The default value of this setting is 2M. As for the errors that may occur during the file upload there is a binding for that in the Upload file bindings, it is called error message.

Sign in to reply to this post

martin389853

yer fair point. it's been a while since I did file uploads and I forgot about that. I will use the

<input type="hidden" name="MAX_FILE_SIZE" value="2147483648">

to test for the value and produce a friendly error message to the user until I sort out the php ini file. I'm not installing an your error console because I use my own error handling script but I was expecting a user friendly file upload response to allow - not for script error, but human error, so the user knows why their file didn't work. Since I have to write this along with pretty much everything else, I have come to the conclusion that extensions are not for me.

Thanks anyway.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...