mina-ftpserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hartnup <john.hart...@gmail.com>
Subject Re: Restricting hidden files to upload
Date Mon, 20 Feb 2017 10:11:12 GMT
Do you want to forbid upload of hidden files?

I think if your onUploadStart() sends a `550 Permission Denied` response,
then returns SKIP, you'll achieve that goal. You would not need to delete
the file, as it would never get created.

You would need a different way to tell if the file is hidden than
File.isHidden() -- because you would not yet have a file. On UNIX, it's
just a filename starting with a dot.

On Mon, Feb 20, 2017 at 9:31 AM Gary Bell <gary.bell@aero.bombardier.com>

> I would look at overriding the NativeFtpFile.listFiles() method to achieve
> this. The filesystem is pluggable and comes with a native filesystem
> implementation by default; but you can implement your own and therefore
> obtain whatever functionality you need.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message