Commit Graph

299 Commits

Author SHA1 Message Date
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
Andrei Marcu 1fb92ffce3 Fix bug where using curl with json headers would return the file instead 2019-01-14 15:28:28 -08:00
Andrei Marcu c746f70c10 Allow changing the "selif" path name 2019-01-14 14:55:27 -08:00
Benjamin Neff 6290f408ff Allow to paste images (#153)
dropzone.js doesn't support pasting itself yet, so adding it externally
and calling `.addFile()` to upload the pasted image.

Fixes #130
2019-01-11 09:09:54 -08:00
mutantmonkey 5f4f16e08b Add file ETag support (fix #138) (#152) 2019-01-08 20:28:01 -08:00
mutantmonkey 10938a3e0b Remove Google URL shortener (fix #146) (#150) 2019-01-08 11:56:32 -08:00
mutantmonkey bad7d2666e Switch to Referrer-Policy header (#149)
Use of the Content-Security-Policy header to specify a referrer policy
was deprecated in favor of a [new
header](fc55d917be).
This change changes the existing referrer policy directives to use this
header and adds corresponding config options/command line flags.
2019-01-08 11:56:09 -08:00
Andrei Marcu 19a95e36a6 Fix Travis parsing of 1.10 as 1.1 2019-01-08 11:28:10 -08:00
Andrei Marcu f19247a790 Update Travis to 1.10 and 1.11 2019-01-08 11:18:57 -08:00
Thor77 5d8a0ef605 Serve file directly for curl and wget user agents (#145)
* Serve file directly for curl and wget user agents

Fix #127

* Add test for get with wget user agent

* Add -nodirectagents flag

to disable serving files directly for wget/curl user agents

* Fix TestPutAndGetCLI failing for Go 1.5

It failed because it doesn't include the Content-Type header for every
response.
2018-11-07 10:13:27 -08:00
Andrei Marcu 7c024d9aab
Merge pull request #141 from bruj0/patch-1
Fix files and meta permissions
2018-04-25 21:39:21 -07:00
Rodrigo D. L b82371250a
Fix files and meta permissions
When running under docker-compose the volume changes the permissions by default to root but its avoided if the directory where it is mounted is created first with the correct owner.
2018-04-21 13:01:25 -03:00
Andrei Marcu 4fa6423a85
Merge pull request #137 from mutantmonkey/issue_136
Fix -nologs on linx-cleanup tool (closes #136)
2018-02-26 12:01:33 -08:00
mutantmonkey c015b5f1da Fix -nologs on linx-cleanup tool (closes #136) 2018-02-25 14:47:04 -08:00
andreimarcu e86f19ecb1 Add linx-cleanup to build script 2017-10-10 22:14:53 -07:00
Andrei Marcu ceea32de6b Merge pull request #124 from mutantmonkey/cleanup_tool
Add linx-cleanup tool
2017-05-04 23:06:26 -07:00
mutantmonkey a69aa95a87 Add `linx-cleanup` info to readme 2017-05-04 21:55:15 -07:00
mutantmonkey 32b537a057 Add missing `flag.Parse()` call 2017-05-03 21:12:41 -07:00