File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ impl PdfStorage for PdfStorageCtx {
273
273
if let Some ( location) = self . locations . get ( 0 ) {
274
274
let req = File {
275
275
copy_requires_writer_permission : Some ( true ) ,
276
- drive_id : Some ( location. drive_id . to_string ( ) ) ,
276
+ drive_id : location. drive_id . clone ( ) ,
277
277
parents : Some ( vec ! [ location. folder_id. to_string( ) ] ) ,
278
278
name : Some ( filename. to_string ( ) ) ,
279
279
mime_type : Some ( "application/pdf" . to_string ( ) ) ,
@@ -320,7 +320,7 @@ impl PdfStorage for PdfStorageCtx {
320
320
321
321
#[ derive( Debug ) ]
322
322
pub struct PdfStorageLocation {
323
- pub drive_id : String ,
323
+ pub drive_id : Option < String > ,
324
324
pub folder_id : String ,
325
325
}
326
326
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ pub struct StaticStorageConfig {
74
74
75
75
#[ derive( Debug , Deserialize , Serialize ) ]
76
76
pub struct PdfStorageConfig {
77
- pub drive : String ,
77
+ pub drive : Option < String > ,
78
78
pub folder : String ,
79
79
}
80
80
Original file line number Diff line number Diff line change @@ -96,6 +96,12 @@ impl RfdUpdateAction for UpdatePdfs {
96
96
new : & mut PersistedRfd ,
97
97
mode : RfdUpdateMode ,
98
98
) -> Result < RfdUpdateActionResponse , RfdUpdateActionErr > {
99
+ // TODO: This updater should not upload a new version if there were no material changes to
100
+ // the RFD. This is slightly tricky as we need to consider the contents of the RFD itself
101
+ // as well as any external documents that may become embedded in it. It would be great if
102
+ // we could hash the generated PDF, but from past attempts PDFs generated via asciidoctor-pdf
103
+ // are not deterministic across systems
104
+
99
105
let RfdUpdateActionContext { ctx, update, .. } = ctx;
100
106
101
107
// On each update a PDF is uploaded (possibly overwriting an existing file)
You can’t perform that action at this time.
0 commit comments