Commit 881638d
committed
Extracting method to ease future switching logic
In discussion with @no_reply, in addressing #4195, we want to explore
the following path:
1) As early as possible in the request cycle, create a
Hyrax::UploadedFile for both a CarrierWave file or a file selected
for upload by BrowseEverything.
2) Building on step 1, we would then hope to reduce branching logic in the
request cycle, and preserve existing class interfaces.
By making this non-breaking change, I'm orienting the code to deliver on
this aspirational goal.
Next steps would be:
1) Update the Hyrax::WorksControllerBehavior to create
Hyrax::UploadedFile records for the files selected from
BrowseEverything (note CarrierWave handles the "inline" uploads).
2) Adjust the extracted `Hyrax::UploadedFile#perform_ingest_later`
method to handle files that were created from BrowseEverything.
The plan is to add a field to the UploadedFile (perhaps
`url_of_file_to_ingest`) that the Hyrax::WorksControllerBehavior would
populate based on user input parameters.
With that in place, we could look at backporting the solution into the
ActorStack.1 parent 1aa7bdf commit 881638d
File tree
3 files changed
+35
-8
lines changed- app
- models/hyrax
- services/hyrax
- spec/models/hyrax
3 files changed
+35
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
31 | 52 | | |
32 | 53 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | 164 | | |
171 | 165 | | |
172 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
11 | 23 | | |
0 commit comments