# Anexo B -Definir Repositorio con HFRConfFilRep
En mi ejemplo se llama contrato y está en la carpeta raíz del directorio virtual donde se ejecutan los programas.
Luego el código genérico es:
Call (PFRAddFilToDwn, “nombre del repositorio”, “nombre del archivo”,
“”, FRFileType.Pdf, 1, &FilId, &FilSee, &ResCod, &ResMsg)
If (&ResCod <> 0)
&GP_Mensaje = Udp(PFRRepMsg, &ResMsg, "E")
Do 'GP: Reportar mensaje'
Else
&GP_Url = Link(HFRDwnFil, &FilId, &FilSee, “”)
Do 'GP: Ir con retorno a &GP_Url'
EndIf
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
En mi ejemplo:
Call(PFRAddFilToDwn, "contratos", "pru.pdf", "", FRFileType.Pdf, 1,
&FilId, &FilSee, &ResCod, &ResMsg)
If (&ResCod <> 0)
&GP_Mensaje = Udp(PFRRepMsg, &ResMsg, "E")
Do 'GP: Reportar mensaje'
Else
&GP_Url = Link(HFRDwnFil, &FilId, &FilSee,"")
Do 'GP: Ir con retorno a &GP_Url'
EndIf
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9