-
Notifications
You must be signed in to change notification settings - Fork 500
Image upload API ? #12
Comments
The sticky part is the consumer. I wrote it entirely expecting a PDF-only setup, but I've started on a branch called As for an API (as in, a URL you can post to?), that's probably not a lot of trouble. I'll see if I can roll that in too. |
Actually, the more I think of this, the more I don't like the idea of an HTTP POST, but prefer something simpler like email:
What do you think? |
But if you were to just download the posted pic (via api) to the consume folder you would have the same setup (assuming you detect imgs as well as pdfs from your directory) as rigth now, with additional functionality without much extra work (see rest api etc.). The same stuff could be used for consuming a mail client. Though in my experience it is far easier to add another rest api than adding a whole mail client (especially if you want to support more than just gmail) I guess the deciding factor is whether you want to add receipts from on the way and don't want/have an internet facing server to accept the rest requests.. |
The thing about a RESTful API is that you need a client then. Take this user case as an example:
I can add an API of course, but I'm not sure I see a use case for it if this mail thing works out. |
I think What you guys think ? |
So long as the someone building the app isn't me, I'm cool with it :-) I can add a simple REST service. I'll make it part of the branch I'm working on. |
What I've mentioned above, if the api and mail work by saving the received receipt img to the consume folder, you won't need much specialized code (and have the possibility to add more in the future). I think a simple webpage for file upload shouldn't be too difficult and from there one could use somethink like phonegap to create simple ios/android apps from there |
This all sounds good by me, save for the fact that exposing a REST API means putting Paperless on a publicly-facing machine -- something I try to avoid if I don't need it. But rolling a simple POST view into Paperless isn't too tough. I'll do what I can. In the mean time, I'm working on the mail component outlined here and it's about 80% done. The tricky part is actually parsing the email and pulling out an attachment, but I've found a few resources that're making this less painful. |
I agree! But you can always use the api from inside your network as well. (e.g. to upload from other devices into a central application) I think I have played with that some time ago, if you need some assitance, let me know! |
I like the idea about putting stuff directly into the consume folder, particularly images. We have set up multiple scanners (for receipts) that feed their output as images to a single,shared directory (all in LAN).. consuming from that would be perfect for me. I don't need the POST API (email is very useful, I hadn't thought about that) but consuming images from a directory is perfect |
I've been working on this feature for a little over a week now, and while I'm not yet ready to push it into master yet (needs lots more testing) those of you interested in fiddling with it or checking it out can take a look at the images-as-docs branch. |
I've just merged the great big branch that includes image support and a crude API. Details are in the changelog. |
Should we have an API to upload image of a bill/receipt. Not everyone has a document scanner I think uploading images would be really handy this way?
The text was updated successfully, but these errors were encountered: