Ecosyste.ms: OpenCollective
An open API service for software projects hosted on Open Collective.
github.com/shrinerb/shrine
File Attachment toolkit for Ruby applications
https://github.com/shrinerb/shrine
59e8a801a901b3b901e23341ed8ea42355f6a684 authored over 7 years ago by Janko Marohnić <[email protected]>
4b96ccce9b0b39a88a80b82197ff394c606f82c4 authored over 7 years ago by Janko Marohnić <[email protected]>
With the new HTTP.rb backend and the upcoming wget backend, there isn't
really a reason to ever ...
This was supposed to be part of the previous commit.
f004a2952c289779abac69db38cb001ad74ceea6 authored over 7 years ago by Janko Marohnić <[email protected]>19d49925096a012484f69aabffdd3cde2b9794fc authored over 7 years ago by Janko Marohnić <[email protected]>
If the "time" standard library wasn't loaded by another piece of code,
the logging plugin would ...
90ea7693e6ac32c0bf361b041d9e9cdfaf8c24d0 authored over 7 years ago by Janko Marohnić <[email protected]>
818b3f4aa709b525e43c8da811dcea927444a3e1 authored over 7 years ago by Max Melentiev <[email protected]>
6047895005624e5451951271461e8c4523ff8341 authored over 7 years ago by Janko Marohnić <[email protected]>
Tempfile.new requires the basename to be provided on Ruby 2.2 or lower.
478f7a6c0bb2359f395dbae6519c1e6106fc379f authored over 7 years ago by Janko Marohnić <[email protected]>96357ebae491363f2c5a38c495c22bdccec88058 authored over 7 years ago by Janko Marohnić <[email protected]>
We don't need to assign the attacher class to a class variable on the
model, we can find the las...
Some people accidentally pass the :bucket option as nil in
Shrine::Storage::S3#initialize, for e...
ActiveRecord users that wish to translate Shrine validation errors along
with all other validati...
Closes #160
34428d96aa0e584c395bdf869001ef0db4cb7fbe authored over 7 years ago by Janko Marohnić <[email protected]>248f8658322fffc51bc4702a7dfb878689735615 authored over 7 years ago by Yuya Tanaka <[email protected]>
393c196241f8512730a0cf79a8ad68997923b958 authored over 7 years ago by Janko Marohnić <[email protected]>
The download_endpoint doesn't use Down anywhere, so we don't have to
require it.
f3cf3bbd58ea115999c0ec6006e758bc459e3ec0 authored over 7 years ago by Janko Marohnić <[email protected]>
Base64.encode64 by default wraps the base64 result into 60 columns,
adding newlines after each 6...
In Mime::Types 3.0 the columnar storage became the default, so we can
stop requiring it explicit...
The MiniMime gem is significantly lighter than the Mime::Types in terms
of require time, so this...
See https://bugs.ruby-lang.org/issues/13539
1c5b68a83203613fb2ddebdd046482ef4dec596d authored over 7 years ago by Janko Marohnić <[email protected]>
Down 3.0 allows #size to be set on Down::ChunkedIO after it has been
initialized, and since Down...
b352615e93523b7c6732b20482cfbadfe2fdc3cb authored over 7 years ago by Janko Marohnić <[email protected]>
69a414e3b8550e043911fb806c344e6990177b90 authored over 7 years ago by Janko Marohnić <[email protected]>
96731b1f91dfcec8cea4e3ccf6461575b339e0f7 authored over 7 years ago by Janko Marohnić <[email protected]>
This would be an unnecessary limitation, there is no reason why not to
give ability to instantia...
8602f1f3b1e4b27db418dbf1b73cdcf557f03b4e authored over 7 years ago by Dan Sexton <[email protected]>
Unlike Base64.encode64, which adds a newline after each 60 characters
and a newline at the end o...
If we declare the File object as a static attribute value, the same File
object will be used for...
It turns out that `Base64.encode64(Digest#digest)` doesn't generate the
same output as `Digest#b...
10f2d1e543355c5b08c82b224ae224d3398b6b61 authored over 7 years ago by Janko Marohnić <[email protected]>
26315bfe049f7a4e4026fa0fa8af5b3a01860b6b authored over 7 years ago by Igor S. Morozov <[email protected]>
ecb1aabbb48e713e2d35b1d86324270272edfcc2 authored over 7 years ago by Janko Marohnić <[email protected]>
Currently we are streaming the response body in chunks, and we're using
a buffer string so that,...
abcb42dea8c7c089c358c2d02c99ce9f9253c2c8 authored almost 8 years ago by Janko Marohnić <[email protected]>
41f5f8ce83fe4f98f8047a9ecf8c58942e1a6a7c authored almost 8 years ago by Janko Marohnić <[email protected]>
5da727675ee735bb0b3d2fe80ef1154f51f100b5 authored almost 8 years ago by Janko Marohnić <[email protected]>
c3190d1e266aa3c334b73468f8858ee8a2d9a3e2 authored almost 8 years ago by Janko Marohnić <[email protected]>
We do this for the same reason for which we made `Storage::S3#object`
public.
08db6530ba57ffd1cd82e74dac8029e0b5d63df8 authored almost 8 years ago by Janko Marohnić <[email protected]>
b7745f51106f09867a9126f9a24ae3d6d811cc87 authored almost 8 years ago by Janko Marohnić <[email protected]>
Fixes #142
a2cf7dbac1f65f670a5785a11bd5c4dc708c801f authored almost 8 years ago by Janko Marohnić <[email protected]>9f8d5a533e81a654a7e1ee8409f3c85cb745a333 authored almost 8 years ago by Janko Marohnić <[email protected]>
This way users can convert the Rack uploaded file hash into an IO object
directly, which is usef...
With the upcoming `Shrine.rack_file` method users will be able to
convert Rack uploaded file has...
c6fb870e8d1540cae435931c6734582615cee07c authored almost 8 years ago by Janko Marohnić <[email protected]>
It's good practice for IO objects to conform to this interface.
52185128a15a0c65c3a00b3dd844064eae50b8ce authored almost 8 years ago by Janko Marohnić <[email protected]>418ecc937ee038a30b20a010f8fd6f7e640faee4 authored almost 8 years ago by Janko Marohnić <[email protected]>
It's useful for a user building their file upload flow to be able to
reuse functionality of Shri...
506e7f7f976d57cd0836c4211abbbb26990e70a6 authored almost 8 years ago by Janko Marohnić <[email protected]>
It's both more explicit and more readable, because it has the word
"attachment" in the name. Peo...
26c058231bfaee27ea8f24a4359bca3be5fc66be authored almost 8 years ago by Janko Marohnić <[email protected]>
dfc9a63acf6004b67945bcef09bacc0ebfb75822 authored almost 8 years ago by Janko Marohnić <[email protected]>
It's useful for developers building a file attachment flow to just be
able to just extract MIME ...
Generating hashes from files can be useful for doing checksums or
validating uniqueness of files.
It makes sense to me to return the resolved plugin module, especially
when testing in the console.
One user tried to return a hash of metadata with symbol keys in the
`add_metadata` block, and it...
fd3929118da666d503236e9f141cdf0d1bd46e56 authored almost 8 years ago by Janko Marohnić <[email protected]>
f491195ccef0a231117479be8007b93a20d108cd authored almost 8 years ago by Janko Marohnić <[email protected]>
b5554b99244d6ee27b9aff926ff1f2982c21c87c authored almost 8 years ago by Janko Marohnić <[email protected]>
This is in my opinion as secure as limiting on Nginx level, but it's
easier to maintain and more...
Passing regexes to extension/MIME type validations has been deprecated.
1064e76008319d2b58b9b517262b0b3098751d60 authored almost 8 years ago by Janko Marohnić <[email protected]>
No need to pass the Tempfile path and have aws-sdk open its own file
descriptor, we can pass in ...
When FileSystem storage is used as the temporary storage, since its
Shrine::UploadedFile won't r...
By default aws-sdk will use chunk size of 5MB for multipart upload, and
50MB for multipart copy....
f3f9af497c285cb155d4dfdb68388e17d258d0b3 authored almost 8 years ago by Janko Marohnić <[email protected]>
8c3020586c2398afea9f700937829109af154b7d authored almost 8 years ago by Janko Marohnić <[email protected]>
c07600596471b1a60f927512804bae8df1ab5d6b authored almost 8 years ago by Janko Marohnić <[email protected]>
Also remove the Heroku note, as Heroku now seems to allow uploading to
any directory, not just t...
3f273d9a1ef08aad978a5c036f232bb69024cc11 authored almost 8 years ago by Janko Marohnić <[email protected]>
789a55d3c29c3ffd7318f0fc6c6a7dce144a7097 authored almost 8 years ago by Janko Marohnić <[email protected]>
If instead of comparing by regular equality we switch to comparing by
hash equality, we can simp...
When migrating a large number of attachments, it might not be feasible
to make an HTTP request f...
Fixes #132
5b8cb4c3e7d1de34c5a67704c0e212c823f9d505 authored almost 8 years ago by Janko Marohnić <[email protected]>77617abe983f306ffe9e99e6901783c29e49aafe authored almost 8 years ago by Janko Marohnić <[email protected]>
021b0082309cb0bba0a52d29c76ae1b8dc4c66f8 authored almost 8 years ago by Janko Marohnić <[email protected]>
c8f2b734d6eac3000dd53948c8b49a47eb112b57 authored almost 8 years ago by Janko Marohnić <[email protected]>
There is no need to load the `backgrounding` plugin only for a specific
uploader, and it complic...
91f2094ae7bcf58b2a626c64893ed3a977077317 authored almost 8 years ago by Janko Marohnić <[email protected]>
aca9c549ca74c23e03a332483f184093deb48f30 authored almost 8 years ago by Janko Marohnić <[email protected]>
When doing direct S3 uploads, correct content types should be set on
initial direct upload, beca...
fe64feadae8e487a09cb39ac8b821ce4d59b0a13 authored almost 8 years ago by Janko Marohnić <[email protected]>
6438f3afbf1e5635a0dfe7696bab953c34ddf937 authored almost 8 years ago by Janko Marohnić <[email protected]>
Most image viewing desktop software automatically orient rotated images
(a photo can be rotated ...
c725d2e2a66742d157d53b129071b3b0b71b5822 authored almost 8 years ago by Janko Marohnić <[email protected]>
Updates documentation wording
109e33cfdce9f8e4aa961d4edc584de09c81af9a authored almost 8 years ago by Janko Marohnić <[email protected]>
FileSystem#clear! with an :older_than parameter was entirely skipping
directories which were mod...
71a0c3986769bf8aba8692cacf7a41d0263e4edc authored almost 8 years ago by Janko Marohnić <[email protected]>
Using a Tempfile makes creating a DataFile significantly slower, because
2/3 of that time is spe...
RFC 2397 specifies that media type in a data URI can have additional
parameters, e.g.
data:te...
30c0a0a0abd3ab7bb1b88d9c1dc1dfbf16b0655f authored almost 8 years ago by Janko Marohnić <[email protected]>
There is no reason to keep the parsed data URI in memory, so we save the
content to disk and dea...
This is allowed (or probably even required) by the RFC 2397 data URI
specification.
Performing a regex match on the whole data URI can be fairly slow, and
it is unnecessary conside...
So far we were both converting a data URI into an IO object and
assigning it to the model inside...
After we convert binary content to base64 format, we can deallocate the
binary string with Strin...
78c872527e13959b0ae2cf116d62ac05b43b22ae authored almost 8 years ago by Janko Marohnić <[email protected]>
018f81f4bad2c8703195c1578ac6592810dac384 authored almost 8 years ago by Janko Marohnić <[email protected]>
Grape converts all request parameters into a Hashie::Mash (which is a
Hash subclass), including ...