how to do Filename validation when uploading a file?

More
3 years 1 month ago #123901 by claudiotreme
claudiotreme created the topic: how to do Filename validation when uploading a file?
Good morning,
In my university they run the server in linux, so it wont receive any files containing "^, ~, ´, ç," on the filename.
But when i put a file containing this especial characters, it shows that "the file has been sent ", But the server wont receive it because of these characters.
So i'm trying to do a script that check for these characteres in the filename when they try to upload it,
And show a error on the screen.
But i can't find how to do it properly. I'm trying to find the name of the file so i can try to do something ( i'm new at coding )

My test survey:
jano.unifei.edu.br/prppg/questionarios/i...hp/827624/lang-pt-BR

In the attachments there are 3 prints that show somethings that i found when i was specting elements, but i dont know how to use these informations.
Thanks
Attachments:

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago #123908 by holch
holch replied the topic: how to do Filename validation when uploading a file?
You are aware that Limesurvey is renaming all files anyway, right? So I guess your problem is actually no problem. Did you try it?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
3 years 4 weeks ago #124088 by claudiotreme
claudiotreme replied the topic: how to do Filename validation when uploading a file?
the file system wont receive the file,
when you put correct filenames ->



and i receive the file correctly,
but when you put a file with especial characters ->


i dont receive any file.
Attachments:

Please Log in or Create an account to join the conversation.

More
3 years 1 week ago - 3 years 1 week ago #125668 by DenisChenu
DenisChenu replied the topic: how to do Filename validation when uploading a file?
Your server don't use UTF8 ?

---
After a quick test :
- Your server don't use UTF8 : then iframe window is not in UTF8 : (Content-Type: text/html; charset=iso-8859-1), then browser wait and send iso-8859-1
- Set AddDefaultCharset utf-8 somewhere at the server.

Now : question :
- Did you use last build number of LimeSurvey ? If yes : you can report a bug.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 3 years 1 week ago by DenisChenu.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!