-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to add attachment (pictures, receipts, etc) to expenses #63
Comments
Thanks @ZeWaren for such a well-qualified issue 😊 That’d be a very cool feature. It would mean we have a choice to make about how to store the images. Here are some solutions I can think of: Use an S3 bucketProbably the most generic option, the cheapest one, and the one that will satisfy most users. It’s not too much work in the app, but it means dealing with the AWS console, and updating the documentation to explain how to create an S3 bucket. Use Vercel BlobThe easiest solution to set up. It might make sense as the app is built with Next.js and so the most common use case is to deploy it on Vercel. But I’d prefer avoiding adding another dependency to Vercel. (Even though I use the Vercel’s database, it’s a plain PostgreSQL database and I can switch to another one anytime. It doesn’t work that way with Blob.) Other hosting servicesCloudinary, Bytescale and others provided a nice solution for hosting images, including widgets for upload. They are also more expensive. I don’t know if they support uploading something else than an image (like a PDF document). Other solutions?Storing files on the same host as the app is not really an option as the app runs on a read-only filesystem (on Vercel, and I suspect it’s the same on many hosting services). The ideal solution would be to offer several photo-hosting solutions, and an easy way for anyone to add their own. For now, my preference would go to using an S3 bucket (providing the credentials as an environment variable). It would be an opt-in feature, i.e. if you deploy your own instance but don’t want to provide S3 credentials, you simply won’t have access to the uploading feature. |
No issue with all the solutions you provided. However, some people who self-host the project on some simple architectures (VPS, Raspberry Pi) would be perfectly happy with using the next directory somewhere on their filesystem. |
I just implemented image upload, storing them to S3 (#64). I think it covers most of the needs, but I created two other issues to continue on this path (not too urgent though): |
As a user, I would like to be able to attach files to expenses.
Typical use cases:
On a mobile device, receipts can be added from the gallery, or from the camera directly (I believe the mobile operating systems can handle that case directly).
As I user, I want to:
The first version would simply store the files directly on the same host the server is running.
On a technical level, ideally the directory/folder where the attachments are stored should be configurable (with an env variable).
Later, we could implement more storage mechanisms (FTP, SFTP, S3, etc.)
The text was updated successfully, but these errors were encountered: