Commit graph

22 commits

Author SHA1 Message Date
James Lopez
78cd19631a
fix avatar uploader error 2018-09-10 17:41:51 +02:00
James Lopez
a2aa505805
Refactor code to remove object storage flag from Import/Export
Updated docs, refactor import/export code
Fix AvatarUploader path issue
Fix project export upload webhook error
2018-09-06 16:52:42 +02:00
gfyoung
d5ee813e3d Enable frozen string in apps/validators/*.rb
Partially addresses #47424.
2018-07-05 00:13:58 -07:00
Sean McGivern
a7dae52e9d Merge branch '4163-move-uploads-to-object-storage' into 'master'
Move uploads to object storage

Closes #4163

See merge request gitlab-org/gitlab-ee!3867
2018-02-28 20:58:15 +01:00
Kamil Trzcinski
263717d70c Do not perform hard check (presence of file on storage)
Instead perform soft check (the column set to indicate that file does exist)
2017-09-19 16:41:28 +02:00
Robert Speicher
3a0be1c5fc Add RecordsUploads module to record Upload records via callbacks 2017-03-06 14:41:09 -05:00
Robert Speicher
a8c62dfe5c Minor refactoring of Uploaders
- Moves a duplicate `file_storage?` definition into the common
  `GitlabUploader` ancestor.
- Get the `uploads` base directory from a class method rather than
  hard-coding it where it's needed. This will be used in a subsequent MR
  to store Uploads in the database.
- Improves the specs for uploaders.
2017-02-24 16:41:27 -05:00
Jacob Vosmaer
ec273b8d06 Copy, don't move uploaded avatar files 2017-01-03 15:37:32 +01:00
Jacob Vosmaer
6731ab5d76 Add Gitlab::Middleware::Multipart 2016-12-15 12:26:36 +01:00
Yorick Peterse
5371da341e
Remove event caching code
Flushing the events cache worked by updating a recent number of rows in
the "events" table. This has the result that on PostgreSQL a lot of dead
tuples are produced on a regular basis. This in turn means that
PostgreSQL will spend considerable amounts of time vacuuming this table.
This in turn can lead to an increase of database load.

For GitLab.com we measured the impact of not using events caching and
found no measurable increase in response timings. Meanwhile not flushing
the events cache lead to the "events" table having no more dead tuples
as now rows are only inserted into this table.

As a result of this we are hereby removing events caching as it does not
appear to help and only increases database load.

For more information see the following comment:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6578#note_18864037
2016-11-23 14:17:07 +01:00
winniehell
58c562a951 Remove magic comments from Ruby files (!5456) 2016-07-24 07:08:45 +02:00
James Lopez
76771c2946 squashed - added avatar saver/restorer and specs
added spec for avatar saver

avatar saver!

added avatar restorer spec

fix spec

added avatar restorer class

fix export service

fix warnings, added changelog

fix spec

some refactoring based on feedback

fixed a few issues after testing i/e avatar
2016-07-19 13:06:06 +02:00
Rémy Coutable
1714883107 Revert "Merge branch 'avatar-cropping' into 'master' "
This reverts commit 01160fc061, reversing
changes made to 4bff9daf8b.
2016-03-15 14:55:40 +01:00
Johann Pardanaud
0701b70c9c Minor changes on avatar cropping internals
- Avoid multiple calls to `validates` for the avatar attributes.
- In a cropping process, don't check if the model inherits `User`, check if it responds to `:avatar_crop_size`.
2016-02-18 13:12:39 +01:00
Johann Pardanaud
bf6aa15512 Improve avatar cropping internals, based on suggestions made by @rspeicher on !2773 2016-02-17 18:35:16 +01:00
Johann Pardanaud
78588cfca1 Improve user experience for avatar cropping
- Avoid incomprehensible errors on non-integer cropping values
- Set the default cropping area to 80%
2016-02-16 19:50:23 +01:00
Johann Pardanaud
3ca16ec2ec Fix failing tests introduced in commit 6d58088 2016-02-10 13:09:13 +01:00
Johann Pardanaud
6d5808801f Fix #7959: Fix avatar stretching by providing a cropping feature 2016-02-09 22:26:50 +01:00
Dmitriy Zaporozhets
796bb65170 Remove duplicate methods in uploaders
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-16 13:01:34 +01:00
Douwe Maan
4ef6ffaad3 Split up AttachmentUploader. 2015-02-20 15:19:50 +01:00
Dmitriy Zaporozhets
8184a65644 Revert "Fix broken access control and refactor avatar upload"
This reverts commit 7d5f86f6cb.
2015-02-19 08:57:35 -08:00
Hannes Rosenögger
7d5f86f6cb Fix broken access control and refactor avatar upload
This commit moves the note folder from
/public/uploads/note
to
/uploads/note
and changes the uploader accordingly.
Now it's no longer possible to avoid the access control by modifing the url.
The Avatar upload has been refactored to use an own uploader as well
to cleanly seperate the two upload types.
2015-02-16 20:10:15 +01:00