New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS Bucket Alternative #1846
Comments
Yep. Totally understand and agree. We support direct uploads for profile images, but not attachments. If you have someone willing to do the work, or are willing to sponsor someone to do the work, then it would not be too much effort to support direct uploading for attachments using the same systems that profile images use, |
Thanks for the heads up on where to look. :) Once I get it working I'll submit a pull request. |
Great to hear you're able to help! May I recommend that you use an environment variable to switch between current behaviour and new behaviour in the UI? Another tip: the Attachment model could be extended to support a Paperclip attachment, and you could add a method that returns the attachment url from either system. |
Please feel free to ask me for any help in figuring this out, good luck! |
I had planned on using an environment variable to do that. 👍 |
for the record here is the REALLY quick fix:
|
So here is the solution. Simply changing the paperclip_defaults will set everything to be uploaded to You can fix up your ENV with the following shell command (assuming you built Loomio according to the developer installation guide): If you want to save files to the filesystem:
If you want to save files to AWS:
Disclaimer: I am not sure what will happen if you already have files logged in your database and then switch from filesystem to AWS. |
I guess I jumped the gun on that one. The solution above is only valid pre 1.0 and only works for avatars, group banners and group icons. IT IS NOT A SOLUTION FOR COMMENT IMAGES. |
I suspect that it's because our attachment uploading is really custom What is blueimp? On Mon, Jan 26, 2015 at 5:22 AM, denjell notifications@github.com wrote:
|
Yeah @robguthrie - and I think that that is a total bummer because it wouldn't have to be that way if the whole world wide web had always ran on concepts like we see in angular and websockets. I guess I am at a bit of a loss as to where I should stick my time as a developer here. My feeling is that the smartest thing to do is to go the entire upload thing the angular way. No more code-bloat through individual systems for profiles, banners, comments, images, videos, docs and zips but a singular API structure to handle single-page uploading with server-side mimetype verification and virus detection, as well as a scaffolding that allows for immediate presentation according to delivered file type and finally a storage system that puts files in that place that the administrator has set up - be it FS, NFS, ZFS, RIAK-CS, FAKE-AWS, REAL-AWS or whatever. This is my reasoning: The paperclip gem uses the [edit] By not sanitizing user uploaded data, even in the case of mime-valid images, users are exposed to unsanitised files and this is a risk I am not willing to take on the behalf of the users of the system I administer - because some layers will remain public. For my "beta" deploy, I will probably just turn off the comment upload feature and instruct my users to apply markdown formatting to embed images that they have uploaded somewhere else. I know, it only skirts the problem, but I don't really see any other way around this roadblock other than what I wrote in the second paragraph. p.s. The blueimp lib is referenced in |
The new attachments system will allow local file uploads, or using other providers with a little environment tweaking. I'll be providing some docs around this in the upcoming days, which will make it into the tech manual as well. |
Our NGO is considering adopting loomio, but we have a strict policy preventing me from using off-site storage. Furthermore, we do not have the facilities to spin up 3 riak-cs servers to "fake the buckets".
I understand the methodology behind using federated services like facebook and google authentication as options for logging in and registering. These are nice to have, but there is still the option to register "normally". It would be grand to be able to use a similar "graceful degradation" back to the native filesystem if for whatever reason AWS is not appropriate.
Is there a fork or an approach that could be recommended in this case?
The text was updated successfully, but these errors were encountered: