[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] image upload chmod
Quoting Mat Jones - booksellersolutions.com (mat@booksellersolutions.com):
> I am trying to create a public image gallery, where people can upload image
> files.
> I am using the [value-extended] tag as you can see in the sample code below.
> The catalog I am running is on 4.6.1.
> My problem is, when the image is save it has -rw-rw---- permissions. Is
> there a tag I can use to change the file permissions so it is world
> readable, without me having to go in to that directory and do a chmod each
> day..
>
> Thanks
>
> Mat
>
> [set name=upload_filename interpolate=1][calc]
> $filename = "";
> $filename = $CGI->{newfile};
> $filename =~ s|.*[\\/]||;
> return $filename;
> [/calc][/set]
>
> [value-extended Yes=1 No=0 name=newfile
> outfile="images/publicgallery/[scratch upload_filename]"]
>
Try
[value-extended Yes=1 No=0 name=newfile
umask=022
outfile="images/publicgallery/[scratch upload_filename]"]
--
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH 45013
phone +1.513.523.7621 <mheins@redhat.com>
Research is what I'm doing when I don't know what I'm doing.
-- Wernher Von Braun