Home/Support/Support Forum/File upload truncates some file names
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

File upload truncates some file names

0 votes
Using Net+/OS 7.5.2.2 with most recent patches on ME 9210, and have a strange problem when uploading files.
I have a web page, based on a Digi example, which allows the user to upload files into a specific directory within the flash file system. This has (apparently) worked for many years.
I've now tried to upload file "OFFSETS.TXT" - and it was stored with the first four characters of the file name removed - as "ETS.TXT".
I've experimented with similar file names; "OFFLOAD.TXT", "OXXSETS.TXT" and "OFFYETS.TXT" worked; "OFFSZTS.TXT", "AOFFSET.TXT" and "OXFSETS.TXT" didn't (among others).
I can upload the file correctly via FTP, so I suspect the problem lies somewhere in the AWS interface.
Has anyone else had a problem like this?
Any suggestions on how to debug it?
asked Feb 5, 2016 in Embedded Devices by steved2 Seasoned Professional (151 points)
To eliminate my code, I've just tried this with the Digi HTTP File system example on a Connectcore 9215, and get the same problem. So looks as if the problem is within the Net+O/S package

Please log in or register to answer this question.

2 Answers

0 votes
i haven't seen this before. Please open a support case.
answered Mar 3, 2016 by LeonidM Veteran of the Digi Community (3,170 points)
0 votes
I couldn't see how to open a support case (we don't have a support contract).
I've traced the problem to a bug in sys/http/file.c in the vicinity of line 700 - the presence of the string "FS" anywhere in the file name causes the name to be truncated. Down to use of strstr() where strcmp() or strncmp() looks to be more appropriate.
answered Mar 7, 2016 by steved2 Seasoned Professional (151 points)
...