Unwanted and weird behaviour of Document (filename) field

I stumble upon something very weird in an application using Document (filename) fields.

Uploading a file with the name test (1).jpg works fine, but test (1).pdf or test (1).gif or test (1).txt or other extension than jpg does not.

Same counts for other special characters in the filename like &, +, etc.

If i change test (1).pdf to test (1).pdf.jpg it uploads fine. Same trick works with other extensions.

Why does the jpg file with special chars in it’s filename upload and files with other extensions not? And shouldn’t it work fine for all extensions?

[QUOTE=scriptfan;37657]I stumble upon something very weird in an application using Document (filename) fields.

Uploading a file with the name test (1).jpg works fine, but test (1).pdf or test (1).gif or test (1).txt or other extension than jpg does not.

Same counts for other special characters in the filename like &, +, etc.

If i change test (1).pdf to test (1).pdf.jpg it uploads fine. Same trick works with other extensions.

Why does the jpg file with special chars in it’s filename upload and files with other extensions not? And shouldn’t it work fine for all extensions?[/QUOTE]

It should and it’s an old reported bug (including the needed fix) by rr. In fact it was reported several times.

Hmm, so the Scriptcase-organization also shows a bit of unwanted and weird behaviour. I’ll address it now with an extra instruction for the user, but find that actually not a very suited solution. Let’s hope our Brazilian friends can find the time to correct the code of the Scriptcase-tool on this point.

Sadly enough they gave me the following reply.

Good Morning!

It is no longer necessary accomplish remote access.
We found the problem, is the use of editable grid.

If you use the form as multiple records or single record the file upload works fine.

Of course this basically says that they dont fix it even tho I practically spelled them out how to fix it in why it goes wrong…
We want to use an editable grid with an upload field so their answer was basically insufficient.
The difference between en editable grid and a multiple record is not that big. But the way it works makes a multiple records form too difficult.
It has too many things buttons and needs too many confirmations for the user, in the grid you only need one button per record…

Too bad that they didnt take on this issue… :frowning:

And in that case I can add, that in my application the Document (filename) fields reside on single record forms. So their answer is incorrect. Weird.

Hello,

do you uses the last release (8.00.0047)?
I tested here and worked normally.
I created a Document (File name) and upload files with these format : .jpg, .pdf, .gif and .txt. the only problem that happened was with type .txt, when file is empty don’t upload it.

What is your database and charset used in application and database?
What is your OS?


Best regard,
Netmake team

Hello, thanks for your reaction.

I’m using 8.00.0030 and do get an outdated warning every morning, but do not have the power to update. Charset of the application is Western ISO-8859-15. The browser runs on Windows 7 and the webserver on Linux. The database is Oracle with charset WE8MSWIN1252. What has the charset of the database to do with a Document (filename) field?

Please wait, we are in the midst of testing 0047. When it is tested we’ll do the upgrade.
Be aware that moving over from 0030 to 0047 does have an error, it can cause a phantom php method with no code to suddenly appear. You should delete that method then.

Hello,

Well, my system-manager updated Scriptcase to the suggested .47 version, but the weird and unwanted behaviour as described in my openingpost is still there.

Yep as I guessed. It is still the same bug… It is their bug the only way to properly fix it is to edit the generated code since sc doesnt seem to acknowledge this bug. Although I explained it in minute detail and I gave the solutions…
And fixing it should be a easy therefore…

[QUOTE=rr;37969]Yep as I guessed. It is still the same bug… It is their bug the only way to properly fix it is to edit the generated code since sc doesnt seem to acknowledge this bug. Although I explained it in minute detail and I gave the solutions…
And fixing it should be a easy therefore…[/QUOTE]

The annoying thing is that I directly reported the bug to SC and still got no reply. Even though the anser is there, it’s appearantly a too difficult issue to solve (for them).

As said: that’s weird and unwanted behaviour of the Scriptcase organization.

Mr. Oliveira: would it be possible for you to solve this problem?

[QUOTE=rr;37969]Yep as I guessed. It is still the same bug… It is their bug the only way to properly fix it is to edit the generated code since sc doesnt seem to acknowledge this bug. Although I explained it in minute detail and I gave the solutions…
And fixing it should be a easy therefore…[/QUOTE]
Point to the thread where explanation is and I will sticky

Hello Scriptcase,

Would it be possible for you to solve this problem?

/Scriptfan