Re: Upload Userdir trailing slash issue
Marc-Etienne Vargenau <[email protected]> Mon, 9 Feb 2015 12:10:10 +0100
| Newsgroups | gmane.comp.web.wiki.phpwiki.talk |
|---|---|
| Message-ID | <[email protected]> |
On 08/02/2015 20:37, Harold Hallikainen wrote:
> I accidentally sent this directly to Marc-Etienne instead of the list
> yesterday. Any thoughts by anyone on this issue?
>
> THANKS!
>
> Harold
>
>
> Marc-Etienne,
>
> THANKS for the fix of the edit page! Now, running Subversion r9456, a
> previous problem has come back. I have user directories enabled for
> uploads. When I try to do an upload, I get this message:
>
> Cannot create upload directory
> "/home/harold/public_html/org/bh/uploadsharold/".
>
> There should, of course, be a slash between uploads and harold.
>
>>From config.ini, I have:
>
> UPLOAD_USERDIR = true
>
> UPLOAD_DATA_PATH = /uploads/
>
> I remember this being an issue years back, but it was fixed, and now
> appears to be back. I can't find my fix.
>
> Thanks!
>
> Harold
Hi Harold,
I am sorry, but I cannot reproduce your issue.
The function getUploadDataPath will always return a string ending with
a slash. See below.
Marc-Etienne
function getUploadDataPath()
{
if (defined('UPLOAD_DATA_PATH')) {
return string_ends_with(UPLOAD_DATA_PATH, "/")
? UPLOAD_DATA_PATH : UPLOAD_DATA_PATH . "/";
}
return SERVER_URL . (string_ends_with(DATA_PATH, "/") ? '' : "/")
. DATA_PATH . '/uploads/';
}
--
Marc-Etienne Vargenau [email protected]
Alcatel-Lucent International, Route de Villejust, 91620 NOZAY, FRANCE
+33 1 60 40 28 33 OnNet 2103 2833
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/