Commit Graph

316 Commits

Author SHA1 Message Date
Andrei Marcu 7543c82473 Remote upload: Add direct_url param for redirect 2020-03-12 14:18:12 -07:00
Andrei Marcu a0c508c422 Travis: Update to 1.14 2020-03-12 13:47:57 -07:00
Andrei Marcu c61db30f9f Tests: Fix image torrent test 2020-03-12 13:44:28 -07:00
Andrei Marcu fb0d44f132 Custom pages: Implement adding custom markdown pages to the site navigation 2020-03-12 13:32:35 -07:00
Andrei Marcu 9f6346a373 Basic auth: fix for using different paths 2020-03-12 01:20:56 -07:00
Andrei Marcu a4c0e0ac37 .gitignore: Add ignore entries 2020-03-11 02:01:38 -07:00
Andrei Marcu 68a80d3698 Go mod: update to 1.14 2020-03-11 02:00:37 -07:00
Thor77 9a8bb1bb7f Add support for go modules 2020-03-11 01:58:36 -07:00
Andrei Marcu 773eb877bd Basic auth: Fix #201 - broken uploads 2020-03-10 22:45:24 -07:00
Andrei Marcu 7ca3331044 Access Key: Fix mobile access 2020-03-07 18:52:29 -08:00
Andrei Marcu e4468715ac Merge branch 'stek29-accesskey' 2020-03-07 17:53:20 -08:00
Andrei Marcu e06e9ad6fe Access key: Some cosmetic changes 2020-03-07 17:52:07 -08:00
Andrei Marcu a4240680c8 Merge branch 'accesskey' of git://github.com/stek29/linx-server into stek29-accesskey 2020-03-06 15:29:41 -08:00
Andrei Marcu 779fc5c425 Readme: Clarify basic auth usage 2020-03-06 15:26:10 -08:00
Paweł Płazieński 597bec430c
Allow Basic authentication in browser (#195) 2020-03-06 15:21:49 -08:00
Andrei Marcu fabb8f2dd7 S3: Add retro-compatibility for Delete_key 2020-03-06 15:04:32 -08:00
Preben Uhrskov Berg a86a144485
Remove dash from DeleteKey for 3rd party S3 compatibility (#192) 2020-03-06 14:49:42 -08:00
Viktor Oreshkin c53b850aef add access_key to api 2020-03-01 04:00:39 +03:00
Viktor Oreshkin 4baaa0a15f add access_key to paste 2020-03-01 03:56:43 +03:00
Viktor Oreshkin 3947197225 wrap access.html in white container 2020-03-01 03:47:28 +03:00
Viktor Oreshkin 5a6e589500 redesign access key input box in uploader 2020-03-01 03:43:53 +03:00
Viktor Oreshkin 4361c44128 fix domain field in setAccessKeyCookies 2020-03-01 03:24:01 +03:00
Viktor Oreshkin b63274ad01 allow limiting access by passwords (fix #194) 2020-02-17 18:02:47 +03:00
Andrei Marcu cf0a30f46a
Add URL to demo 2020-01-16 16:26:25 -08:00
Andrei Marcu 1d583bcb48 Fix #189 - Markdown lists don't show numbers/bullets 2019-12-02 18:38:07 -08:00
Andrei Marcu 85be5b078d Add a max-height for videos display 2019-12-02 18:30:15 -08:00
PaulC 0e763cb776 Allow UNIX socket in FastCGI mode (check if bind starts with /) (#190)
Allow UNIX socket in FastCGI mode (check if bind starts with /)
2019-12-02 18:24:11 -08:00
nia bf090c5119 build.sh: build for netbsd (#181) 2019-06-13 12:50:59 -07:00
mutantmonkey 50c1bdc018 Fix S3 uploads (#178)
My previous change that reworked how metadata generation worked was not
correct for two reasons:

* It passed the original `io.Reader` (with no bytes remaining) to
  `GenerateMetadata`
* It did not seek back to the beginning of the temporary file after
  writing to it, causing any subsequent reads to return EOF.

This change fixes both issues and S3 uploads now work fine. We really
ought to investigate adding test coverage to our S3 backend to avoid
similar recurrences.
2019-06-04 18:35:52 +02:00
mutantmonkey 872340e0dc Fix PutMetadata with S3 backend (#176)
It turns out that the S3 API expects the additional `MetadataDirective:
REPLACE` option in order to update metadata. If this is not provided,
then metadata will simply be copied from the source object, which is not
what we wanted.
2019-05-09 09:13:58 -07:00
mutantmonkey 8098b7e39e Add PutMetadata function to storage backends (#171)
* Add PutMetadata function to storage backends

This function is not currently used, but it will be useful for helper
scripts that need to regenerate metadata on the fly, especially scripts
to migrate between storage backends. In the future, we can also use it
to automatically regenerate metadata if it is found to be missing or
corrupted.

* Add PutMetadata function to storage backend interface and
  implementations
* Rework metadata generation to be more efficient and work better with
  the PutMetadata function
* Add a basic test for metadata generation

* Change PutMetadata to take a Metadata type instead

It's unlikely that this function is useful if it always regenerates the
metadata. Instead, the caller should do that if it needs.
2019-04-09 13:28:18 -07:00
Andrei Marcu 2c0b2b2e79 README reordering 2019-03-14 10:58:17 -07:00
mutantmonkey 770cb20479 Add support for conditional requests (#162)
This change pulls in some code copied from net/http's fs.go so that we
can support If-Match/If-None-Match requests. This will make it easy to
put a caching proxy in front of linx-server instances. Request
validation will still happen as long as the proxy can contact the
origin, so expiration and deletion will still work as expected under
normal circumstances.
2019-01-30 22:52:43 -08:00
mutantmonkey 73f127306c Improve UI a bit (#161)
* Remove right margin from expiration dropdown on index
* Use flexbox for bin/story display
* Move Paste/Save button after expire dropdown, instead of before
2019-01-28 23:00:07 -08:00
mutantmonkey f46b61399b Fix broken page when file is missing (#160)
With the localfs backend, it's possible for a file to be removed but its
metadata file to remain intact. In this case, viewing the selif URL for
that file would return a broken page with two error pages stacked on top
of each other. This changes fixes that by replacing the output in that
case with a single "Unable to open file." error message.
2019-01-26 16:32:37 -08:00
Andrei Marcu cde964ffe0 Hide filename input when force random is on 2019-01-26 02:12:49 -08:00
mutantmonkey 8f3108148b Add option to force random filenames (fixes #86) (#159) 2019-01-26 02:04:32 -08:00
Andrei Marcu a79bc1898a Add binaries/ to .gitignore 2019-01-26 01:00:04 -08:00
mutantmonkey 5037573eab Clean up build.sh and build for linux/arm64 (#158)
* Clean up build.sh and build for linux/arm64
2019-01-26 00:56:35 -08:00
Andrei Marcu d5aa09a65c
Update screenshots in readme 2019-01-25 01:10:09 -08:00
Andrei Marcu f6cd7fc6fe Tweak documentation 2019-01-25 00:20:52 -08:00
mutantmonkey 207c19e3df Add -s3-force-path-style flag and config option (#157)
This option forces path-style addressing instead of using a subdomain.
This appears to be needed by Minio.
2019-01-25 00:10:06 -08:00
Andrei Marcu 35c4415f8d Document storage backend usage 2019-01-24 23:39:17 -08:00
mutantmonkey 5d9a93b1e2 Add S3 backend (#156) 2019-01-24 23:33:11 -08:00
Thomas Sänger 0fb5fa1c51 use sha256-simd (#155) 2019-01-24 23:21:49 -08:00
Andrei Marcu b731e17c1e Cosmetic tweaks & fixes 2019-01-16 02:27:05 -08:00
Simon Alfassa fd0f3d9e46 Make the web page mobile friendly 2019-01-16 01:09:55 -08:00
mutantmonkey 5340f23f4d Add new multi-stage slim Dockerfile (#154) 2019-01-14 22:41:03 -08:00
Andrei Marcu 9d7f698c70
Add direct_url info to API page 2019-01-14 16:16:15 -08:00
Andrei Marcu e506304b84 Return direct URL in json responses 2019-01-14 15:28:32 -08:00