NetPBM and filename spaces

Is Coranto not working properly for you? Here's where to ask for support help; for best results, follow these steps:
  • - Check your core/addon documentation for possible solutions
  • - Search these forums for similar problems that have already been solved
  • - If you're still stumped, check out THIS TOPIC, and post your question in this forum!!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

NetPBM and filename spaces

Postby oretaxa » Fri Dec 07, 2007 9:03 am

My NetPBM works fine but generates 0KB image if filename includes spaces. I'm looking for it around the forum but at the moment I've found nothing.
I've only found this test in multipart file code:
Code: Select all
=item *

Size of thumbnails are 0 Kb - This was a problem before when Multipart only could create thumbnails for JPG files or if
the filename included spaces. This should have been solved in this release, but if you do
encounter it, please make a detailed report in the Coranto Forum at CTUS (L<http://coranto.gweilo.org/>).



Actually I use Coranto 1.24 and Multipart 1.59 (build 25)

Davide - Italy
Last edited by oretaxa on Fri Dec 07, 2007 10:32 am, edited 1 time in total.
User avatar
oretaxa
 
Posts: 33
Joined: Fri Mar 07, 2003 10:20 pm
Location: Massa, Tuscany - Italy

NetPBM and filename spaces

Postby oretaxa » Fri Dec 07, 2007 10:19 am

I' ve found this code in an old post:

Code: Select all
# Removes all unwanted characters (1.57)
$Subs{Multipart_KillChars} = << 'END_SUB';
sub Multipart_KillChars {
             $_ =~ s/ +/_/g;
             $_ =~ s/[^A-Za-z0-9\-\.\_]+//g;
             return $_;
}
END_SUB


How do I have to change it?

Actually I use Coranto 1.24 and Multipart 1.59 (build 25)
In my Coranto installation there are two upload fields:
- small image (resized by NetPBM):
- image (resized by NetPBM)

1) No filename spaces (image.jpg)
If there aren't filename spaces, NetPBM generates correctly 2 images (image.jpg and image-small.jpg)
2) Filename spaces (image withspaces.jpg)
If there are filename spaces, NetPBM doesn't resize image (image withspaces.jpg) and doesn't generate small image (0K file and filename is only "image": it seems stopping before space)

How could I cancel spaces or replace spaces with underscores in the filename image?

Davide - Italy
User avatar
oretaxa
 
Posts: 33
Joined: Fri Mar 07, 2003 10:20 pm
Location: Massa, Tuscany - Italy


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 2 guests

cron