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 {
273273 if let Some ( location) = self . locations . get ( 0 ) {
274274 let req = File {
275275 copy_requires_writer_permission : Some ( true ) ,
276- drive_id : Some ( location. drive_id . to_string ( ) ) ,
276+ drive_id : location. drive_id . clone ( ) ,
277277 parents : Some ( vec ! [ location. folder_id. to_string( ) ] ) ,
278278 name : Some ( filename. to_string ( ) ) ,
279279 mime_type : Some ( "application/pdf" . to_string ( ) ) ,
@@ -320,7 +320,7 @@ impl PdfStorage for PdfStorageCtx {
320320
321321#[ derive( Debug ) ]
322322pub struct PdfStorageLocation {
323- pub drive_id : String ,
323+ pub drive_id : Option < String > ,
324324 pub folder_id : String ,
325325}
326326
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ pub struct StaticStorageConfig {
7474
7575#[ derive( Debug , Deserialize , Serialize ) ]
7676pub struct PdfStorageConfig {
77- pub drive : String ,
77+ pub drive : Option < String > ,
7878 pub folder : String ,
7979}
8080
Original file line number Diff line number Diff line change @@ -96,6 +96,12 @@ impl RfdUpdateAction for UpdatePdfs {
9696 new : & mut PersistedRfd ,
9797 mode : RfdUpdateMode ,
9898 ) -> 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+
99105 let RfdUpdateActionContext { ctx, update, .. } = ctx;
100106
101107 // On each update a PDF is uploaded (possibly overwriting an existing file)
You can’t perform that action at this time.
0 commit comments