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
b1b0b0df80b2d344073d186d3d07a3f0abc64c3e authored over 9 years ago by Janko Marohnić <[email protected]>
I don't think it's really necessary, because I can't think of a case
where the application would...
Later we may want to mix in the filenames to UIDs if it proves
necessary, so better to not have ...
20d31dac30b24b7be7061b43900e00f2d74a8d40 authored over 9 years ago by Janko Marohnić <[email protected]>
Amazon S3 supports multiple deletes in a single HTTP request, so caring
about performance as we ...
The contract is that Storage#open needs to return a valid IO object,
which means it will respond...
6b9a2add70d51581b3f30f68bb50a0a91dfaa473 authored over 9 years ago by Janko Marohnić <[email protected]>
S3 for example will by default always set application/octet-stream
Content-Type header. However,...
We also yield the record and the attachment name in the Shrine.validate
block, so that users can...
I was trying to make the plugin, but I was getting errors, and the
internals of Reform were so c...
"Endpoint" is too generic, from the name of the plugin you can't tell
what it does, just that it...
Currently mime type would be saved on processed files (because Tempfiles
don't respond to #conte...
"Content type" referes to the "Content-Type" header, which is whatever
the browser sends in head...
We might later support retries deletions, so we want to keep the name of
the plugin generic enough.
7be5a34a74bf614786a6cb402e3a0ac60af777df authored over 9 years ago by Janko Marohnić <[email protected]>
Cached files are now automatically deleted when promoted, and keep_files
plugin receives a new :...
* Fixed parallelize to work with moving
* Fixed logging to not make Shrine#store private (it's ...
6bf5bfcabd2b0caa0269a9f4f8d66168013dbf2c authored over 9 years ago by Janko Marohnić <[email protected]>
I like the minitest/test style assertions, but I really need the
grouping so that I can organize...
Users should make two separate uploaders for models and for forms,
because they will probably wa...
* `#cache` and `#store` accessors aren't necessary, they aren't special
to Shrine itself, but ...
74248988844720c969dde13145a928e5e77d26ac authored over 9 years ago by Janko Marohnić <[email protected]>
We want to communicate to the users that content type detection provided
by base is not the real...
When your file is cached, attacker can change the metadata in the hidden
field. If a user loads ...
It's causing too many problems, we always have to check if a Hash is a
Rack File or versions, an...
FastImage is the only gem that handles image bombs (a lot of pixels
compressed into small filesi...
210bc284fd123b4853aea1fe21f337de27405bae authored over 9 years ago by Janko Marohnić <[email protected]>
90d8dd2a81902e1fe2c95ab2468a5aa6e862a1a3 authored over 9 years ago by Janko Marohnić <[email protected]>
When uploading to cache, the URL can easily be deducted from the ID
client side. They're a littl...
ActiveSupport (which is loaded when requiring ActiveRecord) breaks the
recursive #to_json that i...
9ca3d9d6c54a3f9337876bae96cd7f502c47f8a6 authored over 9 years ago by Janko Marohnić <[email protected]>
If the column returns an empty string, it should be interpreted as nil.
ed82a2c28b8ef2dbdeb3a47b1e76f1ca43459f56 authored over 9 years ago by Janko Marohnić <[email protected]>
We put it outside so that it isn't saved. But then even if you're not
using :return_url you woul...
649db64181e95e3e888ecb9050c5d6ab219a0d4d authored over 9 years ago by Janko Marohnić <[email protected]>
We also put replacing in `after_save`, because this is when no errors
should happen, and it's al...
2d765f3d878ab7ed8351dca868cb6839388134f0 authored over 9 years ago by Janko Marohnić <[email protected]>
48f1ede4e7a03a2f005e34f5406a9a586dcb3c3d authored over 9 years ago by Janko Marohnić <[email protected]>
9a2ca715d2f325aa3808b70dda6baa4377b2869c authored over 9 years ago by Janko Marohnić <[email protected]>
It was meant for less copying during processing, but it's never a good
idea to modify the cached...
This Ruby standard library makes dealing with paths much more concise
(no need to call everythin...
7b10db7624837fdd6b75efa9b16587484926626e authored over 9 years ago by Janko Marohnić <[email protected]>
6c4381d122f0359d0559a520659ea41e421126f1 authored over 9 years ago by Janko Marohnić <[email protected]>
3dfda9c4af5a4f32f517ff10348f181aa46fbcc7 authored over 9 years ago by Janko Marohnić <[email protected]>
0a9c2e6159ae27541e9a77609c7a22926fd76a86 authored over 9 years ago by Janko Marohnić <[email protected]>
Before versions and multiple_files could interfere with logging,
depending if they're loaded bef...
This doesn't actually contain any background deleting logic, but it
can't know which library you...
d41c7c778cd9f9422977f629b8b5598d09ee5457 authored over 9 years ago by Janko Marohnić <[email protected]>
a9cc8d8b070a1f5b91b1c0b249718bb7fef91b67 authored over 9 years ago by Janko Marohnić <[email protected]>
It shouldn't be in the core, because it isn't particularly useful. It's
still useful for us in t...
4042e74fe66dc3532cda7de8159d7104e4545d35 authored over 9 years ago by Janko Marohnić <[email protected]>
It always felt a bit weird, because it was part of the gem but wasn't
part of the plugin system....
1821d390661be6b7d6e744ebf91356336dd3789d authored over 9 years ago by Janko Marohnić <[email protected]>
No need to have it, and then the versions plugin has to implement it.
`to_json` already makes re...
The concept of moving is already present in storage classes, so it makes
sense to also have it i...
cff4fdd28d337548243d17119d6685c8b82b089e authored over 9 years ago by Janko Marohnić <[email protected]>
It isn't consistent with other methods, no need to have a bang.
d9585ae7aff5176259dbcf774c12d0a3f2ed0600 authored over 9 years ago by Janko Marohnić <[email protected]>9eeab5ff3a41d56a39b8de1649d83418de948554 authored over 9 years ago by Janko Marohnić <[email protected]>
It's easier to read if version name is at the beginning than at the end.
239e8a84427d29177ee38f635c7e4db544714ea0 authored over 9 years ago by Janko Marohnić <[email protected]>246dc42fb280a3991f4d5d39774c5429f6ab6d0f authored over 9 years ago by Janko Marohnić <[email protected]>
It can now catch invalid URLs, and transform them to Shrine::Error.
Furthermore, it will not swa...
We initially thought that users will only want to process on caching or
on storing. But there ar...
It is possible to create so-called "image bombs", which are small in
filesize but very large in ...
This is a standard measure of size, it could confuse a lot of people if
they see a number in meg...
It was a wrong decision to switch to strings, this was just paranoia for
the Symbols DoS. We now...
People may want to process and store some versions now, and then
continue processing other ones ...
Deleting cache only happens with the "moving" plugin, but then it's part
of "promoting". If a us...
738dba1757c9a4c4340820a64928179a33cbed5a authored over 9 years ago by Janko Marohnić <[email protected]>
These will usually be result of processing, and are ugly. The default
UUIDs are much prettier.
We switched to strings only because of security paranoia. But actually
the only vulnerable entry...
If we return this inside the data, form submit would save the url into
the database. We don't wa...
c9599a86b19730c025ea0322a72a1c8c704f141c authored over 9 years ago by Janko Marohnić <[email protected]>
d943d81432cc48ebd91285fab34b7b317f590082 authored over 9 years ago by Janko Marohnić <[email protected]>
We may need this certainty later, that when :location is passed in, it's
guaranteed that the fil...
af54ed87bb0c2fdeda62dca61dbb14debbe4a890 authored over 9 years ago by Janko Marohnić <[email protected]>
HTML5 canvas generates data URIs, which we want to allow users to be
able to upload.
Since users can't control which filesizes they accept (like they can in
the attacher), it is goo...
When users are looking at their cache directories, it's much nicer if
there are only folder whic...
19c3279427c242eb4e45bae0e6ccdc568e518386 authored over 9 years ago by Janko Marohnić <[email protected]>
a8ceb96c447a50ffc65e3f4d66cfc0ac84b52075 authored over 9 years ago by Janko Marohnić <[email protected]>
Often after uploading images to enpdoint AJAX, users will want to
display the uploaded images. S...
We want to delete the processed files after uploading, so for that we
use our awesome new "move"...
Attackers can simply change the cached hidden field to anything they
like, and we're calling #to...
Some storages may want to implement generating different URLs depending
on options provided. We ...
Previously we were exposed to a DoS vulnerability, where attackers would
be able to simply dupli...
"Uploadie" was just a temporary name until I come up with something
better. I feel really good a...
Some people might have a problem with invalid files staying cached, so
for them we offer this pl...
I believe this is a unique feature compared to other uploading
solutions. When you look at the F...
4afc3193f6fc421fa9eb11d852fbbbf06dff6a07 authored over 9 years ago by Janko Marohnić <[email protected]>
The linter asserts functionality that Uploadie requires from a storage.
This is expected to be u...
We want to explicitly tell users that `read` needs to respond to two
arguments. We also want to ...
357bc6148c0509d47e8e39fabfe0149870116ee9 authored over 9 years ago by Janko Marohnić <[email protected]>
Some websites will return 403 if there is no User-Agent in the request.
open-uri sets "ruby", bu...
a41ee3481627cb6cb2ef5345d643de28cd8bfe87 authored over 9 years ago by Janko Marohnić <[email protected]>
8457f4a79b18a725e9e2516fa1440ac09fb99f14 authored over 9 years ago by Janko Marohnić <[email protected]>
This was left over when we thought that it's going to be Uploadie::File,
but it turned out to be...
We already have a dedicated method for this, which prints a nice error
message.
"Soft delete" is referred to when something looks like deleted, but
actually isn't. It's used fo...
We don't want that attackers are able to cause errors to your website
simply by passing somethin...
This plugin adds an endpoint which you can mount and use for
caching/storing files via AJAX. Kud...
If the developer wants to build an event store (a system where each
action is saved as an event,...
1870256aa71bf5013f00abe2bb714a5a461d45e5 authored over 9 years ago by Janko Marohnić <[email protected]>