one caveat:
OS X 10.6 and 4D v12 
I have not tested on newer systems

I have had problems with very large files (500 meg and over).
Also - beside to "clean" your file names before trying to save them, 
this is especially true if your system(s) run ion a mixed platform 
environment. Windows can be very picky about file names.

here is some code to 'clean' file names.
(I hope any of the called other utility methods are self explanatory)

  //Project Method:  utl_File_Cleanup_Filenames
  // $1 - text - file NAME (only) to check for bad characters

  //looks for, and changes "bad" characters (determined by windows 
limits) to a dash ("-")

  //RETURNS - text - altered filename
  //• Created 6-15- 09 by Chip
  //• Updated 1/11/17 by Chip - replaced char 202 with char 160 for 
non-breaking space
  //    difference between ascii and unicode, also check for trailing 
period
C_TEXT($1;$Source;$Bad_Characters;$0)
C_TEXT($Replacement_Character)
C_LONGINT($Bad_Char_Count;$i)

$Source:=$1
$Bad_Characters:="!$~[]/:;*?<>|#^'&()"+<>x_Quote+<>x_Cr+<>x_Tab+\
Char(Character code("•"))+Char(92)+Char(160)  //char 92 = \ , 
char(160)= 'hard' non breaking space"

$Replacement_Character:="-"
$Bad_Char_Count:=Length($Bad_Characters)

For ($i;1;$Bad_Char_Count)
$Source:=Replace 
string($Source;$Bad_Characters[[$i]];$Replacement_Character)
End for 

  //windows file names can not end with a period
$Source:=utl_text_Strip_Characters ($Source;"R";".")  //removes 
trailing '.'
$0:=utl_text_Strip_Characters ($Source)  //remove leading and trailing 
spaces
  //end

On Fri, 17 Feb 2017 08:22:53 +0100, Maurice Inzirillo - AJAR via 
4D_Tech wrote:
> Hello Olivier,
> 
> Blob to document And Document to blob with a method set to be 
> executed on server is an easy and reliable solution !
> 
> 
> 
> Best regards,
> 
> Maurice Inzirillo
> -- 
> AJAR S.A.
> 
> 4D v16: http://www.ajar.ch/
> Wakanda Wednesday Lab : http://www.ajar.ch/wwl
> twitter: ajar_info
> Tél : +41 (0)323422684
> 
> 
> 
> 
>> On 17 Feb 2017, at 07:45, flury olivier via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> I am currently thinking of rewriting an existing document management 
>> system. What is the "best" way to move files from the clients to the 
>> server and back from the server to the client?
>> 
>> VARIABLE TO VARIABLE? Execute on Client / Execute on Server? Using a 
>> kind of caching table (store the last x used files)? ...
>> 
>> Gladly appreciate all sharing of experience.
>> 
>> -----Ursprüngliche Nachricht-----
>> Von: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] Im Auftrag von 
>> G-Mail via 4D_Tech
>> Gesendet: Donnerstag, 16. Februar 2017 23:55
>> An: 4D iNug Technical <4d_tech@lists.4d.com>
>> Cc: G-Mail <jody.be...@gmail.com>
>> Betreff: Re: Question about storing data outside of datafile
>> 
>>> On 02/16/2017, at 11:09 AM, Peter Bozek via 4D_Tech 
>>> <4d_tech@lists.4d.com> wrote:
>>> 
>>> Would you like to exchange your know-how? I did similar system, and 
>>> there are some tricky parts in case of C/S.
>> 
>> 
>> There is lots of decisions we made for our purposes, and there are 
>> different ways to do things for sure. We had to meet various 
>> security regulations therefore we changed some of the ways we did 
>> things over the 20 or so years that we had built it. Of course new 
>> technologies came along too that permitted us to change that up.
>> 
>> Is there something specific that you are wanting to discuss?
>> 
>> 
>> 
>> Jody Bevan
>> 
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **********************************************************************
>> 
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **********************************************************************
> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to