Home/Support/Support Forum/post file name
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

post file name

0 votes
Hello,

With AWS, I've got a webpage where I can upload files to the CC9P.

What I would like to do, is to know the file name and file extension before to receive the content of the file.
Doing this, from the same web upload form, I could detect if the file is a binary file for firmware upgrade or another file type that I need to store into file system.

Is there a function or procedure that would give me the file name?

Thanks in advance

Seb
asked Feb 11, 2014 in NET+OS by SebB New to the Community (30 points)

Please log in or register to answer this question.

2 Answers

0 votes
Hello

There is no such function. The best you can do is the following:

In your application/project there is/should be a file entitled file.c. file.c is the web server's (AWS) interface to the file system. You'll have to go into file.c and find where the filename becomes available.
answered Feb 11, 2014 by dakotas_dad Veteran of the Digi Community (694 points)
0 votes
OK. Thanks for the reply.

I'm using file.c functions to process the file stored in the file system.
With this, I can store the binary file for firmware upgrade into the file system, check its extension and use it for firmware upgrade.

But is it possible to upgrade the firmware from a file stored into the file system?

Seb
answered Feb 11, 2014 by SebB New to the Community (30 points)
Hello most developers use either FTP or web to update firmware. To do what you are asking (upgrade from the file system) I recommend looking at functions contained in the following file:

src\bsp\fsintf\fwdl.c

These are the internal calls used during the upgrade process.
That is what I want to do. A web update firmware. But instead of having 2 different upload field (one for file system, one for firmware), I want only one upload field.

I'll have a look at the functions you suggest and hopefully I should get something working.
In the worst case, I'll finish with 2 different upload.

Thanks a lot for your help.

Seb
...