[ewiki] restricted upload avoiding attachments/-modus?
- From: massenmensch <kontakt@xxxxxxxxxxxxxxx>
- To: ewiki@xxxxxxxxxxxxx
- Date: Wed, 26 May 2004 15:03:16 +0200
Hello!
I am seeking the following feature: I am using a system w/ authetication
(_perm_unix) where I want to allow not-logged-in-people to upload pictures.
(Logged in persons shell still be able to upload any stuff.)
My setup offers to layouts, one for visitors w/o any wiki-features, the other
(at another URL) w/ the edit-/upload-/etc.-mechanisms.
My approach: Having html enabled I included the following on a page called
"upload" (or whatever):
<html>
<div class="upload">
<form action="?id=attachments/Upload" method="POST"
enctype="multipart/form-data">
<b>Datei</b><br>
<input type="file" name="upload"
accept="image/jpeg,image/png,image/gif,application/x-shockwave-flash"
size="40">
<br><br>
<b>save w/ different name</b><br>
<input type="text" name="new_filename" size="40">
<br><br>
<b>Kommentar</b><br>
<textarea name="comment" cols="40" rows="3"></textarea>
<br><br>
<b>upload to:</b><br>
<select name="section"><option value="">main</option><option
value="section2">section2</option><option value="Upload"
selected>Upload</option></select>
<br><br>
<input type="submit" value="FileUpload">
<br><br>
</form>
</div>
</html>
... which is a modified version of the usual upload-mechanism in edit/-modus
(restricting uploading only to images).
My problem is, that though it works, I end up in attachments/-mode, now
allowing the user to use the ordinary upload-mechanism (what I don't want).
I'd like the user rather to be forwarded to [ImageGallery] or s.th. simliar.
Any ideas?
* one option would be to check in my index.php for the title of the page
called and in case it is attachments/Upload I'll forward to ImageGallery -
but that's rather dirty
* alternativly, would copying and adjusting plugin/module/downloads.php be an
option?
Happy for replys, solong, Tim
Other related posts:
- » [ewiki] restricted upload avoiding attachments/-modus?