Unable to upload PDF
-
wrote on Nov 16, 2023, 7:39 PM last edited by
Well, that's basically it.
I'm trying to upload a single PDF, but there's no message on the GUI. This is what the console log shows, but I'm clueless why this happens. Any thoughts?
Nov 16 16:33:29I, [2023-11-16T19:33:29.830783 #1] INFO -- : [4c36970a-06bc-4061-bd48-3e37fe400482] {"method":"POST","path":"/api/templates/4/documents","format":"json","controller":"Api::TemplatesDocumentsController","action":"create","status":500,"allocations":6659,"duration":8.23,"view":0.0,"db":0.47,"fwd":"186.10.142.40"} Nov 16 16:33:29F, [2023-11-16T19:33:29.831410 #1] FATAL -- : [4c36970a-06bc-4061-bd48-3e37fe400482] Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] NoMethodError (undefined method `filter_map' for #<PDF::Reader::Stream:0x00007f277af5fea8 @hash={:N=>3, :Alternate=>:DeviceRGB, :Length=>2612, :Filter=>:FlateDecode}, @data="[REDACTED]", @udata=nil>): Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] lib/templates/build_annotations.rb:12:in `block in call' Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] lib/templates/build_annotations.rb:10:in `each' Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] lib/templates/build_annotations.rb:10:in `flat_map' Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] lib/templates/build_annotations.rb:10:in `with_index' Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] lib/templates/build_annotations.rb:10:in `call' Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] lib/templates/create_attachments.rb:44:in `block in find_or_create_blobs' Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] lib/templates/create_attachments.rb:40:in `map' Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] lib/templates/create_attachments.rb:40:in `find_or_create_blobs' Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] lib/templates/create_attachments.rb:12:in `call' Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] app/controllers/api/templates_documents_controller.rb:10:in `create' Nov 16 16:33:29[4c36970a-06bc-4061-bd48-3e37fe400482] lib/api_path_consider_json_middleware.rb:15:in `call' Nov 16 16:33:30I, [2023-11-16T19:33:30.053374 #1] INFO -- : [d2b8ba3b-29d3-45db-b1bb-d061cded4296] {"method":"GET","path":"/","format":"html","controller":"DashboardController","action":"index","status":200,"allocations":1662,"duration":7.3,"view":3.85,"db":0.86,"fwd":"172.18.0.1"} Nov 16 16:33:40I, [2023-11-16T19:33:40.057734 #1] INFO -- : [d4c379a2-2bc9-45f2-a403-7653c3ee3630] {"method":"GET","path":"/","format":"html","controller":"DashboardController","action":"index","status":200,"allocations":1662,"duration":6.35,"view":2.45,"db":0.94,"fwd":"172.18.0.1"} Nov 16 16:33:40I, [2023-11-16T19:33:40.115568 #1] INFO -- : [bc40b038-42e6-4baf-bdac-0683e10ad431] {"method":"POST","path":"/api/templates/4/documents","format":"json","controller":"Api::TemplatesDocumentsController","action":"create","status":500,"allocations":6658,"duration":10.09,"view":0.0,"db":0.51,"fwd":"186.10.142.40"} Nov 16 16:33:40F, [2023-11-16T19:33:40.116590 #1] FATAL -- : [bc40b038-42e6-4baf-bdac-0683e10ad431] Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] NoMethodError (undefined method `filter_map' for #<PDF::Reader::Stream:0x00007f2779a9d858 @hash={:N=>3, :Alternate=>:DeviceRGB, :Length=>2612, :Filter=>:FlateDecode}, @data="[REDACTED]", @udata=nil>): Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] lib/templates/build_annotations.rb:12:in `block in call' Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] lib/templates/build_annotations.rb:10:in `each' Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] lib/templates/build_annotations.rb:10:in `flat_map' Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] lib/templates/build_annotations.rb:10:in `with_index' Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] lib/templates/build_annotations.rb:10:in `call' Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] lib/templates/create_attachments.rb:44:in `block in find_or_create_blobs' Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] lib/templates/create_attachments.rb:40:in `map' Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] lib/templates/create_attachments.rb:40:in `find_or_create_blobs' Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] lib/templates/create_attachments.rb:12:in `call' Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] app/controllers/api/templates_documents_controller.rb:10:in `create' Nov 16 16:33:40[bc40b038-42e6-4baf-bdac-0683e10ad431] lib/api_path_consider_json_middleware.rb:15:in `call' Nov 16 16:33:50I, [2023-11-16T19:33:50.075077 #1] INFO -- : [ae71e33e-ac64-41a5-a446-e385be88e70c] {"method":"GET","path":"/","format":"html","controller":"DashboardController","action":"index","status":200,"allocations":1662,"duration":7.05,"view":4.07,"db":0.83,"fwd":"172.18.0.1"} Nov 16 16:34:00I, [2023-11-16T19:34:00.074425 #1] INFO -- : [49bb0de5-f873-42ad-b883-965fd6b42ad6] {"method":"GET","path":"/","format":"html","controller":"DashboardController","action":"index","status":200,"allocations":1662,"duration":7.42,"view":3.84,"db":0.88,"fwd":"172.18.0.1"} Nov 16 16:34:10I, [2023-11-16T19:34:10.060006 #1] INFO -- : [f0832b67-5509-4a13-9592-e1d721a7f844] {"method":"GET","path":"/","format":"html","controller":"DashboardController","action":"index","status":200,"allocations":1662,"duration":7.69,"view":5.44,"db":0.68,"fwd":"172.18.0.1"} Nov 16 16:34:20I, [2023-11-16T19:34:20.069267 #1] INFO -- : [5256ac85-04c4-49e1-bee4-2919e9e6cd0e] {"method":"GET","path":"/","format":"html","controller":"DashboardController","action":"index","status":200,"allocations":1662,"duration":13.13,"view":9.53,"db":0.81,"fwd":"172.18.0.1"} Nov 16 16:34:30I, [2023-11-16T19:34:30.064574 #1] INFO -- : [8f962bf5-8842-4754-b6c7-45a6e8299a4a] {"method":"GET","path":"/","format":"html","controller":"DashboardController","action":"index","status":200,"allocations":1662,"duration":7.15,"view":3.8,"db":1.41,"fwd":"172.18.0.1"} Nov 16 16:34:40I, [2023-11-16T19:34:40.060929 #1] INFO -- : [7def1e61-295f-413e-b7f9-71120d8767b7] {"method":"GET","path":"/","format":"html","controller":"DashboardController","action":"index","status":200,"allocations":1662,"duration":11.75,"view":4.84,"db":2.02,"fwd":"172.18.0.1"} Nov 16 16:34:50I, [2023-11-16T19:34:50.085037 #1] INFO -- : [9f68b825-69a3-49aa-88bc-833f2051e3f9] {"method":"GET","path":"/","format":"html","controller":"DashboardController","action":"index","status":200,"allocations":1662,"duration":11.97,"view":4.04,"db":1.36,"fwd":"172.18.0.1"}
-
wrote on Nov 16, 2023, 7:44 PM last edited by
which action are you using? each is different..
how many have you tried? -
wrote on Nov 16, 2023, 7:59 PM last edited by robi Nov 16, 2023, 8:01 PM
I just installed it on the demo server and it uploads a PDF just fine.
Try it there.
Otherwise a reinstall on your server might be a good idea.
-
wrote on Nov 16, 2023, 8:02 PM last edited by
it seems it just happen with the PDF I need to be there and not with others!
-
wrote on Nov 16, 2023, 8:03 PM last edited by
Is it really a PDF? or a .zip of one?
Try the Sterling PDF tools to convert it and go from there.
-
wrote on Nov 16, 2023, 8:15 PM last edited by
it's a PDF. I just convert it to a couple of JPG pages and it worked
-
wrote on Nov 16, 2023, 8:17 PM last edited by
Cool, then you can mark this topic as a question & solved.
-
wrote on Nov 16, 2023, 8:17 PM last edited by
still is not solved in strict sense, because I don't know why some PDFs works and some other don't.
-
still is not solved in strict sense, because I don't know why some PDFs works and some other don't.
wrote on Nov 16, 2023, 8:29 PM last edited by@chetbaker that's more of a question for the upstream developers then or whatever you use to generate the PDFs that don't seem to be recognized as PDFs.
The upload of PDFs works just fine and is not related to Cloudron.
-
wrote on Nov 23, 2023, 4:30 PM last edited by
@chetbaker @girish it has been fixed in the upstream repo