save an image url

save an image url

Postby Silvio.Falconi » Mon Feb 10, 2020 6:05 pm

when I save an Image the url is

"C:\WORK\PRG\WINBEACH\images\due_lettini_regista.png"

I wish save as " ..\images\due_lettini_regista.png"

how I can resolve ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: save an image url

Postby Otto » Mon Feb 10, 2020 6:20 pm

Silvio,
you have all the functions inside
c:\fwh\source\function\filename.prg.
Did you see that Antonio announced the availability of the mod harbour servers?

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6312
Joined: Fri Oct 07, 2005 7:07 pm

Re: save an image url

Postby Silvio.Falconi » Mon Feb 10, 2020 9:23 pm

Otto,
Sorry,
For now i cannot use mod_harbour
I must terminate my app
I tried with mod_harbour with no success
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: save an image url

Postby Silvio.Falconi » Tue Feb 11, 2020 8:25 am

Otto ,
sorry I TRIED with these functions

//?cFileNoPath( cPathMask )
//?cFilePath( cPathMask )
//?cFileDisc( cPathMask )
//?cFileNoExt( cPathMask )
//?cFileSubDir( cPathMask )
//? cFileUNC( cPathMask )
//? cRelativePath( cPathMask )

with no success!!!!

none give me ..\images\name.png
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: save an image url

Postby Silvio.Falconi » Tue Feb 11, 2020 8:34 am

Resolved

Code: Select all  Expand view
Function test()
Local cPathMask:="C:\WORK\PRG\WINBEACH\images\due_lettini_regista.png"

? RelativePath( cPathMask ) + UrlImage(cPathMask)
return nil

Function UrlImage(curlImg)  
   Local aTmp
   local nLevel := 1
   local x
   local cCad   :=""
   aTmp := Hb_ATokens( curlImg, "\" )
   For x = Len( aTmp ) - nLevel + 1 To Len( aTmp )
       cCad += AllTrim( aTmp[ x ] )
       if x < Len( aTmp )
          cCad  += "
\"
       endif
   Next x
  return cCad

 Function RelativePath( cFile )
   local cPath, cRelPath, cTemp
   cPath:= cFilePath(cFile)
   cTemp:= left(cPath,len(cPath)-1)
   cRelPath:=  "
." + right(cPath, len(cPath) + 1 - rat("\",cTemp) )
return cRelPath
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 41 guests