Instiki
File Uploads (changes)

Showing changes from revision #59 to #60: Added | Removed

image001.jpg?

File uploads are new in .11 Instiki. They provide a simple syntax to include files.

Simply follow the wiki format on a page and after you save you will be prompted by the link to upload the file.

Step by Step:

  1. click on the edit link for a page
  2. enter text like the following. This will become the target for your upload:
    [[Kasep's Fam.jpg:pic]] to upload a picture
    [[file name here.pdf:file]] to upload a file (not limited to pdfs). note: File extensions, or any other use of ’.’ may cause issues.
  3. submit the page
  4. click on the new link, it will prompt you for the file.
  5. re-edit the initial page. Change the [[link]] from above into something like:
    "Description of My File":http://server/webname/files/file-name-from-above

Note: to include an image inline, simply use

<img src="files/PICTURE.jpg"/>
directly in a wiki page.

——

Q: how do you reupload a file?
A: I don’t think you can. You could try redoing the link and uploading the same file. It would probably overwrite. —Daryl

——

Q: how do you actually delete a file?
A: You can’t at this time from the wiki. You would have to go to the physical directory and delete. —Daryl

——

Q: By the way the above steps can be simplified, can’t they? ;)
A: Yes. Please contact Daryl Richter or John Whitley if you’d like to help out.

——

Q: Why do the files continue to show as unlinked wiki words? (xentek)
A: Because you haven’t uploaded the file yet? Mine turn to links correctly. You can’t upload file to this wiki. —Daryl

A: I find that they always stay with their questionmarks until you edit the page again (maybe thats wat he means above?) once you have dome ANYTHING to the page and submitted the bloody thing appears

paul

Ex:
  • file name here.pdf?
  • 34053diso_w.jpg?
  • ScreenshotBIRT1.png?

A: In my case, it’s a caching problem. When you click on a missing file link, you are redirected to File Upload. After successful upload, the File controller redirects you back to the referring page, but it’s not expired. —Kirk

——

Q: I am not able to upload any files at all.
When I re-edit the page the link still stays with a ? and the page says:

  • Internal Error
    An application error occurred while processing your request.

In my logs I see:

ActionController::RoutingError (no route found to match "/fdry/files/myFig.png" with {:method=>:get}): /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ro uting.rb:1292:in `recognize_path' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ro uting.rb:1282:in `recognize' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispa tch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in ` handle_dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in `s

A: Rails routing is splitting the URL at the '.' in your filename myFig.png. I changed my routes.rb to read connect_to_web map, ':web/files/:id', :controller => 'file', :action => 'file', :id => /.+/

——
Q. I checked the checkbox of ‘Publish this web’ at Edit Web? page, but it does not show a IMG file on ’/wiki/published/Home Page.
It shows the IMG file on ‘wiki/show/Home Page’.

> text format is:

 [[image-file.png:pic]]
or, 
 <img src="/wiki/files/image-file.png" />

——

Q. I can’t seem to make the image upload work. Mac Server running Tiger and 0.12 of instiki. http://213.129.69.195:2500/matthewpack/
Love the interface and simplicity of the whole thing so far.

A:?

——

Q: Is there a way to allow users to upload to a sub-directory? Trying to make a link to /wiki/file/subdir/file.jpg says the file name is invalid (because it has a / in it). Is there any way or do you just advise users to name their files idividually?

A:?

——

Q: Like above, can’t make the file upload work. I use Leopard and instiki 0.12. On clicking the ’?’, I get:

no route found to match "/jaspersinstiwiki/show/files/isdnopzeggen.pdf" with {:method=>:get}

I get the same problem. The server outputs this:

127.0.0.1 - - [21/Feb/2008:13:07:53 EST] "GET /notes/edit/Backups HTTP/1.1" 200 5730
http://localhost:2500/notes/show/Backups -> /notes/edit/Backups
127.0.0.1 - - [21/Feb/2008:13:08:13 EST] "POST /notes/save/Backups HTTP/1.1" 302 106
http://localhost:2500/notes/edit/Backups -> /notes/save/Backups
127.0.0.1 - - [21/Feb/2008:13:08:13 EST] "GET /notes/show/Backups HTTP/1.1" 200 4666
http://localhost:2500/notes/edit/Backups -> /notes/show/Backups
127.0.0.1 - - [21/Feb/2008:13:08:16 EST] "GET /notes/files/pt.xml HTTP/1.1" 404 632
http://localhost:2500/notes/show/Backups -> /notes/files/pt.xml

A: ?
file name here.pdf?

A: Remove the file extension – seems to choke on the ”.”
file name here?

A: Add :id => /.*/ to the end of the files route to let Rails know you want the dot in there, not as a seperator.

connect_to_web map, ':web/files/:id', :controller => 'file', :action => 'file', :id => /.*/

Note that this is not a complete solution, since Instiki has trouble finding the new file, but it is a step closer.

——

Q: What is the easiest way to upload a file?
A: Simply put the name of the file into the url like such:

http://server/webname/files/yourFileName

and hit enter. It will then take you to the file upload page. Just remember the name you gave the file. This method also seems to choke if there is a ”.” in the file name – so sorry – no extensions. Which, of course makes it a bit impractical to actually use the files ;-)

——

Q:When trying to upload screenshots I get the message “File uploads are blocked by the webmaster” What do I do to get around this?