Ticket #2 (closed enhancement: wontfix)

Opened 8 months ago

Last modified 7 months ago

Compliment "+download" with "+upload" capability

Reported by: Randy Owned by: sheep
Priority: Low Milestone:
Component: Hatta Wiki Version: 1.3.3dev
Keywords: Cc:

Description

Note: this capability may already exist and this newbie just can't find it.

The "+download/anything" capability is very useful, because I can easily download anything (Wiki pages, foo.png files, bar.pdf, example/.profile, example/.bashrc, etc.). I can type the request directly into the browser URL or create a download link on a web page for user convenience.

Simple uploads are more difficult. If I "+edit/something" then Hatta assumes it's a Wiki page (mime type default?) and opens an Edit form.

If I "+edit/thing.png" then Hatta assumes its a binary and allows me to upload the thing… This is almost what I want, except it doesn't work for uploading everything with any extension.

I want to upload anything, not just files with special extensions. For example, "+upload/foo_page", "+upload/any_file.any_ext", "+upload/test/foo.log", "+upload/user/Randy/example/.profile", etc.

Change History

comment:1 Changed 7 months ago by sheep

  • Priority set to Low
  • Status changed from new to accepted

comment:2 Changed 7 months ago by sheep

Well, Hatta won't work with files without extensions. I tried it, but looking at the file content each time to determine its type was too costly. So it doesn't make much sense to have a general upload action. It is possible to redefine the edit dialogs per file type, so you can have an editor that has both textbox and upload form for some of them. It already gives you an upload form for any unknown extension.

comment:3 Changed 7 months ago by sheep

  • Status changed from accepted to assigned

comment:4 Changed 7 months ago by sheep

  • Status changed from assigned to closed
  • Resolution set to wontfix

comment:5 Changed 7 months ago by Randy Selzler <RSelzler@…>

I still see a basic need, but I may not have described it very well to begin with.
Perhaps the following 'use case' would help.

Wiki users may need to contribute content that already exists on their computer as a file.
For example, it might be a relatively large log file, configuration file or source code.
The primary purpose of the content is not to be viewed as a Wiki page and it's devoid of markup.
The content is offered to other users for download purposes, so they can save it as a file.
Users might compare a saved log file with their 'test case', they might save a 'configuration file' as starting point for their own and they might save a 'source code' script for subsequent execution.

I'd like new Hatta functionality that would allow users to easily upload and download files, regardless of content or filename or extension. The Wiki user interface might be either a special 'button' (like 'Edit', but named 'Upload' and 'Download'), or some special markup (like +download/test.log or +upload/test.log) or special instructions (to upload a 'test.log', manually enter a URL such as " http://goober.com/+upload/test.log", to download enter ...).

Hatta can do some of this now, but it's clumsy. For example, to upload arbitrary text I'd have to edit a new Wiki page, open a text editor, select all contents, copy contents, cut-n-paste the text into the edit form and hit Save. I've no idea how the current Hatta could do something weird, like upload binary into a 'test.log' file. Also, user have no good way of knowing which file extensions provide 'magic' functionality. 'Smart' features like this should also have a 'dumb' way to circumvent them for special cases.

I'd like to have a 'dumb' upload and download capability, even if it has some overlap with a 'smart' Edit feature.

I like having Hatta 'smart' for some conceptual functions like 'Edit'. It should behave different if the filename extension is missing (or is '.txt') compared to '.png' or '.pdf' extensions. 'Dumb' functions are also useful, such as 'Upload' and 'Download' where they aren't dependent on extension names nor file content (text and binary should act the same).

Note: See TracTickets for help on using tickets.