libUrlFtpUploadFile - upload files whose names contain spaces?

Phil Davis revdev at pdslabs.net
Wed Apr 29 18:42:52 EDT 2009


Bob Sneidar wrote:
> Yes.

Yaaay! (sort of)
>
> 1. Down with spaces in the name of any file that needs to be uploaded 
> or downloaded
> 2. BOO on any file that has a special character of any kind. Some 
> characters are safe, but why the heck take a chance?
>
> If you are talking about files that users create that you have no 
> control over, 

And I am. Right now I'm writing code that changes the names of those 
files, replacing spaces with underscores. This will happen just after 
the user relinquishes control to the upload process and before they can 
touch the files again (via my app).

> then I think you will have to escape the file (and path) names. There 
> may be a library that does that, but essentially you would replace 
> space with %20, and any other special characters that you will allow 
> with their respective URL equivalents.
>
> Eventually though you will have to account for the fact that people 
> are going to try to use characters that are simply not allowed, and 
> you will have to check for that and alert the user that illegal 
> characters are being used in the file name.

Yep. Thanks Bob!

>
> Bob Sneidar
> IT Manager
> Logos Management
> Calvary Chapel CM
>
> On Apr 29, 2009, at 2:46 PM, Phil Davis wrote:
>
>> Using 'libUrlFtpUploadFile', what is your experience with uploading
>> files whose 'short' names (not the full path) contain spaces? I think
>> that's the critical variable in my situation; when spaces are there, the
>> upload fails.
>>
>> Can anyone confirm my experience, or else straighten me out?  (Good luck
>> on that second option  ;o)
>>
>> Thanks -
>> -- 
>> Phil Davis
>>
>> PDS Labs
>> Professional Software Development
>> http://pdslabs.net
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

-- 
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net




More information about the use-livecode mailing list