The first optioin: $filepath = $BOLTfilesDir . '/' . BOLTfilter($BOLTarray[$fp], '-_a- z0-9');
worked perfectly. Thank you! Karl On Jan 29, 3:56 pm, The Editor <[email protected]> wrote: > Yes, this line limits the name to letters only (commands.php, line 619 or so): > > $filepath = $BOLTfilesDir . '/' . BOLTfilter($BOLTarray[$fp], > 'letters'); > > You could try changing it to > > $filepath = $BOLTfilesDir . '/' . BOLTfilter($BOLTarray[$fp], > '-_a-z0-9'); > > and see if that doesn't fix it. Or perhaps some actual regex pattern > like '/^([-_a-z0-9]+)$/' > > If this works, let me know, and I'll update the script. Unfortunately > I don't have a filter specifically designed for this. At some point > I'd like to rethink the filtering system a bit (particularly, to > integrate it with form validation), but I guess it's not that > pressing... > > Cheers, > Dan > > > > On Fri, Jan 29, 2010 at 2:44 PM, karlh626 <[email protected]> wrote: > > Thanks Dan for this info. On another note, I posted an earlier > > message about being unable to create subdirs which contained numbers. > > Do you have any quick insight on that? > > > On Jan 29, 10:22 am, The Editor <[email protected]> wrote: > >> Ok, I've looked into this a bit and the problem is the files folder > >> has to exist first before you can create a subdirectory, else you get > >> errors. In php 5 you have an automatic recursion parameter but in > >> keeping with our goal of maintaining support of 4.0 I've instead > >> rewritten the code just a slight bit to automatically make the files > >> folder first before creating any subdirectories, so this should clear > >> up. > > >> In commands.php, I inserted this second line around 609 > > >> $BOLTfilesDir = BOLTconfig('BOLTfilesDir', 'files'); > >> BOLTfixdir($BOLTfilesDir, false); > > >> And then rewrote the section in between the first and last lines > >> below, just a bit farther down: > > >> $fp = "filepath" . substr($field, 6); > >> if (isset($BOLTarray[$fp])) { > >> $filepath = $BOLTfilesDir . '/' . > >> BOLTfilter($BOLTarray[$fp], 'letters'); > >> BOLTfixdir($filepath, false); > >> } > >> else $filepath = $BOLTfilesDir; > >> if ($_FILES[$field]['error'] != UPLOAD_ERR_OK) > >> BOLTabort('upload_error', "~$filename"); > > >> Maybe not quite as efficient, but more foolproof. > > >> Cheers, > >> Dan > > >> On Wed, Jan 27, 2010 at 8:03 AM, karlh626 <[email protected]> wrote: > >> > what about the permissions of the field, file and subdir folders (not > >> > the files inside the folders)? are those different? If the folder > >> > has a different permission or owner/group then the "user" that > >> > boltwire runs under may not permission to either write to that > >> > subfolder or read from that subfolder. > > >> > Make sure that the owner and group as well as the permissions for > >> > files and subdir folders match that of the pages folder. > > >> > Karl > > >> > On Jan 26, 11:38 am, loonquawl <[email protected]> wrote: > >> >> Thanks for the fast answer! > > >> >> The permissions are indeed different - 644 for most files in the Field/ > >> >> Pages folder, but 600 for all uploaded pictures and .txt files in the > >> >> Field/Files and Field/Files/Subdir folders. > >> >> How can i fix this from within Boltwire? (changing the eprmission via > >> >> ftp to 644 (read access for group and world) solved the problem, but > >> >> it would be nice to be able to upload without external-ftp- > >> >> intervention) > > >> >> Thank You. > > >> >> On 26 Jan., 13:30, karlh626 <[email protected]> wrote: > > >> >> > Do you have the same problem if you do not upload to a different > >> >> > directory (just upload to the parent, "files"? > > >> >> > If you look at the user and group permissions in your ftp program of > >> >> > the directory "test" are they the same as "files" or "pages"? > > >> >> > In my experience when displaying pictures located in files > >> >> > subdirectory, the display format needs to be [^image.jpg > >> >> > dir=subdirname^] > > >> >> > Karl > > >> >> > On Jan 26, 7:26 am, loonquawl <[email protected]> wrote: > > >> >> > > Hi! > > >> >> > > I have been using BW for some time now, and am very satified. I only > >> >> > > used text and the embedded Google Calendars, tinkered a little with > >> >> > > the skin and installed the shop action (on the newest version of BW, > >> >> > > 3.3.6). It then occured to me that some images might be nice, so i > >> >> > > uploaded them using the [^image.jpg^] way. Only it did not work, > >> >> > > fully. What happened was, that the images got uploaded, even the > >> >> > > folders were created, for instance > >> >> > > www.______.de/web/field/files/test/ttt3.jpg > >> >> > > . The problem is that those images are not displayed - if i upload > >> >> > > a .txt, it is displayed as a download link, but the download does > >> >> > > not > >> >> > > work, because "403: Forbidden (Directory index forbidden)" - So i > >> >> > > guess this is about permissions - which i do not know anything > >> >> > > about. > > >> >> > > Anybody an idea how to solve this? > > >> >> > > Cheers > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups "BoltWire" group. > >> > To post to this group, send email to [email protected]. > >> > To unsubscribe from this group, send email to > >> > [email protected]. > >> > For more options, visit this group > >> > athttp://groups.google.com/group/boltwire?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "BoltWire" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/boltwire?hl=en. -- You received this message because you are subscribed to the Google Groups "BoltWire" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/boltwire?hl=en.
