xD FAT files available on a browser

Hello,
After having learning docs, it works well.

In my project I’d like

  1. put a file from XMEM to xD-part FAT
  2. to modify this FAT file while it’s available on the web

// Cl�ment A. Stage DUT GEII RENNES - FRANCE -

#class auto
#define TCPCONFIG			1
#define USE_RABBITWEB	1
#define FAT_USE_FORWARDSLASH
#define FAT_BLOCK
#use "fat.lib"
#use "dcrtcp.lib"
#use "http.lib"

#memmap xmem
	#ximport	"pages\index.html"	index_html


SSPEC_MIMETABLE_START
   SSPEC_MIME(".html","text/html"),
SSPEC_MIMETABLE_END

SSPEC_RESOURCETABLE_START
	SSPEC_RESOURCE_XMEMFILE("/",				index_html),
   SSPEC_RESOURCE_XMEMFILE("/index.html",	index_html),
SSPEC_RESOURCETABLE_END

int i ;
#web i;



FATfile mon_fic ;

void main()
{
   long prealloc;
   int rc;
   char contenu_fic[128];
   fat_part *part_xD ;

   prealloc=0;
   part_xD=NULL;

   fat_AutoMount(FDDF_USE_DEFAULT);

   part_xD = fat_part_mounted[4];

   fat_Open(part_xD, "coucou.txt", FAT_FILE, FAT_CREATE, &mon_fic, &prealloc) ;
   fat_Write(&mon_fic,"---essai---", 15);
   fat_Close(&mon_fic);

   fat_Open(part_xD,"coucou.txt",FAT_FILE, 0, &mon_fic, NULL);
	fat_Read(&mon_fic, contenu_fic, 128);
   printf("Contenu fichier : [%s]", contenu_fic);

   sock_init();
   http_init();
   tcp_reserveport(80);

   sspec_fatregister(0, part_xD);



   while(1)
   {


   	http_handler();

   }
}

Some new questions :

  1. Can we change the name of the dir created with sspec_fatregister(…)
    ====> can I have http://myrabbit.net/xD_Fat_folder/myfatfile
    instead of http://myrabbit/E/myfatfile ?

  2. can you explain me the role of prealloc and why it’s used with a pointer ?
    its a long type variable and I’ll write some heavy jpeg files, so have I to declare prealloc as a heavier variable type ?

thx!