You are not logged in.

#51 2010-01-16 11:43:41

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,380
Website

Re: quickserve - easy ad-hoc file sharing

@toad
Something else is already running on that address:port. I've added an exception to make that clearer. I'm not sure why the validity check failed. I've just uploaded a new version so try again with "-Sy quickserve" to refresh the database first.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#52 2010-01-16 11:57:49

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: quickserve - easy ad-hoc file sharing

Cheers Xyne,

done it but I still get the exception.

==> Retrieving Sources...
  -> Found quickserve-2.5.tar.gz in build dir
==> Validating source files with md5sums...
    quickserve-2.5.tar.gz ... FAILED
==> ERROR: One or more files did not pass the validity check!
Error: Makepkg was unable to build quickserve package.

I did yaourt -Sy quickserve...

And thanks for the help flag wink


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#53 2010-01-16 12:30:38

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,380
Website

Re: quickserve - easy ad-hoc file sharing

I've just tested it with the current AUR version. It works here. I might have repackaged the source files for the old version without updating the PKGBUILD, which would then have an incorrect md5sum.

Anyway, try it again, it should work.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#54 2010-01-16 12:55:24

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: quickserve - easy ad-hoc file sharing

Nope, I'm sorry, I still get:

==> ERROR: One or more files did not pass the validity check!

I've cleared the cache completely with pacman -Scc beforehand. What else could be at fault?


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#55 2010-01-19 21:44:11

Mo
Member
Registered: 2007-01-18
Posts: 92

Re: quickserve - easy ad-hoc file sharing

It would be cool to browse the shared directory recursively.
Anyway, great script smile.

Offline

#56 2010-01-20 07:56:02

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,380
Website

Re: quickserve - easy ad-hoc file sharing

@toad
I have no idea, sorry. Are you still getting the issue? Post the PKGBUILD that you're using if you are.

Mo wrote:

It would be cool to browse the shared directory recursively.

What do you mean, exactly?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#57 2010-01-20 12:00:39

Mo
Member
Registered: 2007-01-18
Posts: 92

Re: quickserve - easy ad-hoc file sharing

Xyne wrote:
Mo wrote:

It would be cool to browse the shared directory recursively.

What do you mean, exactly?

When I share a directory which includes sub-directories, I can enter them and download files from them.
Another neat feature would be an option to download everything as a zip- (or whatever) archive.

Offline

#58 2010-01-20 12:38:23

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,380
Website

Re: quickserve - easy ad-hoc file sharing

Mo wrote:
Xyne wrote:
Mo wrote:

It would be cool to browse the shared directory recursively.

What do you mean, exactly?

When I share a directory which includes sub-directories, I can enter them and download files from them.

It does that.

Mo wrote:

Another neat feature would be an option to download everything as a zip- (or whatever) archive.

That's moving into the not-so-simple realm. This isn't meant to be a full-fledged web server for all possible web server needs, just a quick way to share files. If you want to offer a zipped/tarballed/whatever directory, just create the archive and share that. Adding code to check for compression tools and extra options to enable them just isn't worth it.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#59 2010-01-20 12:44:09

Mo
Member
Registered: 2007-01-18
Posts: 92

Re: quickserve - easy ad-hoc file sharing

Xyne wrote:

It does that.

OK, than maybe I did something wrong...

Xyne wrote:

That's moving into the not-so-simple realm. This isn't meant to be a full-fledged web server for all possible web server needs, just a quick way to share files. If you want to offer a zipped/tarballed/whatever directory, just create the archive and share that. Adding code to check for compression tools and extra options to enable them just isn't worth it.

OK, KISS.. you're right smile.

Offline

#60 2010-01-20 12:59:09

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,380
Website

Re: quickserve - easy ad-hoc file sharing

Mo wrote:

OK, than maybe I did something wrong...

It should work by simply specifying a directory. Try this, replacing "me" with your user and using "-b localhost" for security reasons:

quickserve -b localhost /home/me

You should see the directory when you navigate to http://localhost:8080/ and then be able to recurse into its hierarchy. If not, check the terminal that you ran quickserve in for errors and post them along with a description of what you saw when you navigated to that url.

Make sure that you have the latest version too, in case this was due to a transient bug in an older version.

Last edited by Xyne (2010-01-20 13:00:04)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#61 2010-01-20 14:20:15

jarda-wien
Member
Registered: 2008-03-13
Posts: 104

Re: quickserve - easy ad-hoc file sharing

hey Xyne, I think your effort is absolutely GREAT. Do you think there may be an easy way to allow uploads as well? maybe one would need ftp for that...

the problem I am facing with quickly sharing files is that I usually find a way to send files to someone (the search is over with quickshare:D), but I still need a way for other people to send files to me. They are mostly icq contacts with no knowledge whatsoever, so I am the one who has to implement this...

I have been running a full-fledged pureftpd for this, but an easier sollution would be nice.

Offline

#62 2010-01-20 14:33:17

Ape
Member
From: Finland
Registered: 2009-10-15
Posts: 46
Website

Re: quickserve - easy ad-hoc file sharing

jarda-wien wrote:

Do you think there may be an easy way to allow uploads as well?

I agree that uploads would be a useful feature. And it is possible to upload files using HTML forms and HTTP. Maybe quickserve should create a such form that would allow uploading files to the target directory.

Offline

#63 2010-01-20 19:17:08

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,380
Website

Re: quickserve - easy ad-hoc file sharing

Ok, I've added support for uploads using the option "--upload <upload directory>". If this option is given, a link named "[Upload]" will appear next to the "[Back]" link which will load a page with an upload form. The user can choose how many files to upload using the "[More]" and "[Fewer]" links.

The upload directory is not shared by default.

I've also added a "--no-clobber" option which will append numbers to uploaded files to prevent uploaded files from overwriting existing ones.

I might add the following:
*) option to create a unique subdirectory per uploader, perhaps using a hashed IP address as a unique identifier
*) option to set the size limit of the upload directory

I hesitate to add them because quickserve isn't meant to be a robust public server which requires such controls.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#64 2010-01-20 21:46:05

Mo
Member
Registered: 2007-01-18
Posts: 92

Re: quickserve - easy ad-hoc file sharing

Xyne wrote:
Mo wrote:

OK, than maybe I did something wrong...

It should work by simply specifying a directory. Try this, replacing "me" with your user and using "-b localhost" for security reasons:

quickserve -b localhost /home/me

You should see the directory when you navigate to http://localhost:8080/ and then be able to recurse into its hierarchy. If not, check the terminal that you ran quickserve in for errors and post them along with a description of what you saw when you navigated to that url.

Make sure that you have the latest version too, in case this was due to a transient bug in an older version.

I _did_ something wrong.
Works like a charm smile.

EDIT: I got the bug: In case the name of the shared directory contains a whitespace, I doesn't work.

mo ~: quickserve a\ b/
starting Quickserve...
  port:    8080
  serving:
    /home/mo/a b
('xx.xx.xx.xx', 35177)
isp.bla - - [20/Jan/2010 22:58:19] "GET / HTTP/1.1" 200 -
('xx.xx.xx.xx', 35178)
isp.bla - - [20/Jan/2010 22:58:24] "GET / HTTP/1.1" 200 -

The directory "a b" contains another directory called "c". However, when I click on "a b" in my browser I am not able to enter the directory.

Last edited by Mo (2010-01-20 22:01:21)

Offline

#65 2010-01-20 22:44:29

jarda-wien
Member
Registered: 2008-03-13
Posts: 104

Re: quickserve - easy ad-hoc file sharing

Xyne wrote:

Ok, I've added support for uploads using the option "--upload <upload directory>". If this option is given, a link named "[Upload]" will appear next to the "[Back]" link which will load a page with an upload form. The user can choose how many files to upload using the "[More]" and "[Fewer]" links.

WOW Xyne I didn't expect such a fast reaction! I give you big thanks for what you are doing here.
It works like a charm.

Offline

#66 2010-01-21 01:15:28

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,380
Website

Re: quickserve - easy ad-hoc file sharing

@Mo
Are you using Firefox? If so, then I think we've just discovered a Firefox bug. It seems that Firefox truncates some requests to "/" if they contain a space and no trailing "/*", e.g. it will pass on "/a b/" and "/a b/foo" but not "/a b". I tested this with curl and lynx and quickserve correctly returned the expected html. A quick search found some firefox bug report about security issues involving spaces in URLs and I suspect that whatever solution they implemented for that might have led to this. It seems to be related to local file detection too, because when I created "a b", it would not pass that on, but it would pass on "a c". Strangely though, it would still refuse to pass on "a b" after I had rename the directory to "foo bar" (which it would then no longer pass on, although it would pass on "foo ba", and "foo barr").

tl;dr: problem was due to Firefox weirdness


I managed to work around it by adding trailing slashes to the different navigation links. Files seems to work as expected.




@all
Thanks for all the feedback. smile

Last edited by Xyne (2010-01-21 01:16:23)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#67 2010-01-21 07:58:38

Mo
Member
Registered: 2007-01-18
Posts: 92

Re: quickserve - easy ad-hoc file sharing

Xyne wrote:

I managed to work around it by adding trailing slashes to the different navigation links. Files seems to work as expected.

So you mean that navigating directly to "http://localhost:8080/a b/" should work? If yes, it doesn't...

Offline

#68 2010-01-21 11:02:53

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,380
Website

Re: quickserve - easy ad-hoc file sharing

Are you using Firefox?
If yes, does it work with curl/lynx/anything else?
Can you follow the link from "http://localhost:8080/"?
Which version of quickserve are you using?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#69 2010-01-21 19:20:40

Mo
Member
Registered: 2007-01-18
Posts: 92

Re: quickserve - easy ad-hoc file sharing

Xyne wrote:

Are you using Firefox?
If yes, does it work with curl/lynx/anything else?
Can you follow the link from "http://localhost:8080/"?
Which version of quickserve are you using?

Nevermind. I built v3.1 but I forgot to install it...
Works now smile.
Thanks!

Offline

#70 2010-01-22 19:33:49

elstupidos
Arch Linux f@h Team Member
From: Santa Barbara, CA
Registered: 2008-01-14
Posts: 43

Re: quickserve - easy ad-hoc file sharing

This is pretty awesome and very useful..

Thanks Xyne!

Offline

#71 2010-01-24 19:38:17

cool
Member
Registered: 2008-09-12
Posts: 111
Website

Re: quickserve - easy ad-hoc file sharing

An Additional use I found of this application is Audio Video Streaming. as this essentially is a http server.you can stream Movies,Songs across the your network.

*Use VLC.
* Goto Open Media --> Open Network
* enter the exact URL from address bar of your browser of the file you want to stream.note: it should a file, not a directory;)
* Click "Play"

It plays Videos perfectly But sadly seek does not work:|

Last edited by cool (2010-01-24 19:39:04)

Offline

#72 2010-01-24 19:54:45

cool
Member
Registered: 2008-09-12
Posts: 111
Website

Re: quickserve - easy ad-hoc file sharing

One Feature Request:
In Upload mode,
Please add couple of more upload form, so multiple items can uploaded at the same time.  it would save us lot of time.

Like this:
http://www.imagebam.com/

Offline

#73 2010-01-24 20:23:20

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: quickserve - easy ad-hoc file sharing

cool wrote:

In Upload mode,
Please add couple of more upload form, so multiple items can uploaded at the same time.  it would save us lot of time.

Xyne wrote:

The user can choose how many files to upload using the "[More]" and "[Fewer]" links.

Does that not work?

Offline

#74 2010-01-25 11:05:19

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,380
Website

Re: quickserve - easy ad-hoc file sharing

@cool
quickserve_02.png

Just click on [More] to get more upload fields.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#75 2010-01-25 18:47:15

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: quickserve - easy ad-hoc file sharing

If the server is running, can you add more file/directory to it?  I tried and it gave me an error "address already in use".  I can start another server on a different port but it's somewhat inconvenient.  If I run the command in the background (&), how do I stop the server?  There is no quickserve process, do I just killall python?  One minor request, can you add verification if the share existed before start sharing?  For example, quickserve /tmp/somefile, make sure /tmp/somefile existed before serving /tmp/somefile

BTW, great tools....thanks for this app and powerpill, bauerbill, etc.

Offline

Board footer

Powered by FluxBB