Setting upload event
Re: Setting upload event
"Digital Man" <digital.man@VERT> wrote in message
news:444C81AA.20013.sync_sys@vert.synchro.net...
> Re: Setting upload event in s
> By: Cyberdine to DOVE-Net.Synchronet_Sysop on Sun Apr 23 2006 04:41 pm
>
> > I need to resize images when they are uploaded, but only in one specific
> > file area. Can this be done with the Upload Semaphore File setting or
> > should
> > I be looking for a different approach?
>
> Typically this kind of thing would be done with a testable file type. Just
> set
> the access requirements for the testable file type to only operate if the
> current directory is a specific number or internal code.
I'm running into a slight problem. I've set up JPG as a testable file type
as such:
File Extension JPG
Command Line mogrify -resize 480x272! %f
Working String Resizing image for PSP screen...
Access Requirements DIR PSP-IMG
Everything works fine as long as the user uploads the image file with their
telnet client. The problem is most of my users use FTP. When an image is
uploaded via FTP the command is not being executed. Out of curiosity I tried
setting JPG as an extractable file type with the same command line and it
would execute as long as I removed the DIR PSP-IMG access requirement. I
can't do that because it would resize uploaded images in all directories.
In doing some other FTP uploading tests it appears that Testable file type
commands are being ignored if the file was uploaded by FTP. For example, I
add comments to MP3 files that are uploaded. They appear if the MP3 was
uploaded via Telnet but not by FTP.
As an alternative I tried to set the image resizing as a Download Event
instead. Again, same result... works when downloading via telnet but not
FTP.
Any ideas on a solution or is this something requiring a source code update?
---
■ Synchronet ■ Cyberdine Systems BBS ■ telnet://cyberdine.servegame.com