Comments (6)
Because the current code used in the LiveView
make the upload from Javascript (followed by the File Upload
guide in https://hexdocs.pm/phoenix_live_view/uploads.html), because it's been requested that the LiveView
uses the upload/1
function that was implemented, I'm going to create a new page to use LiveView
but use this function. I'm not going to refactor the code of the pre-existing LiveView because it would essentially be overhauled.
In order to not lose the previous work made, I'm going to create a new page that is "clientless", which uses the upload/1
function that was implemented.
from imgup.
The closed PR #64 directly addresses this. It generates the CID
from the contents of the file within the JS
code.
Because using JS
to push the file was not initially intended, I closed off the PR. If relevant, I might open it back up again to finish it.
from imgup.
And yes, I'm doing the "clientless" version now on a different live view page. I want to get this done before doing other issues (like the image classifier) so I can have a more solid foundation to work on it.
I'm branching off from #86 (review) so I don't have merge conflicts later on 👌
from imgup.
With the changes introduced in
Lines 22 to 27 in 2f51c88
from imgup.
The upload.ex is only used for the API.
from imgup.
Indeed the guide written by Chris https://github.com/phoenixframework/phoenix_live_view/blob/v0.19.3/guides/server/uploads.md#L1 uses the JS
"direct" uploads method with signing. That is preferable in certain circumstances. If we can read the contents of the file on the device/browser we could use the JS
implementation of CID
to create the filename and thus continue using the direct upload approach. But I find that it requires considerably more code and isn't well tested. 💭
If you end up making a "clientless" version that uses the upload/1
function, please document + test as much as possible. 🙏
from imgup.
Related Issues (20)
- chore: CORS issue when calling the API from `Flutter` web devices
- Discuss: Dedicated Domain for Image Uploading + Hosting? HOT 1
- chore: Build is failing HOT 4
- Chore: Re-do Landing Page - Remove All Non-essential HOT 1
- Feat: Add Button + `JS` To Copy Image URL HOT 2
- add passing an URL and query string params to resize an image? HOT 3
- Ex_AWS update 2.5.0. No more xml parsing needed HOT 1
- Testing Image-To-Text HOT 84
- First tests - Upload to R2 HOT 6
- First tests - upload to B2 from the server seems ok with ExAws.S3
- Chore: @dependabot Builds Fail 😢 HOT 5
- Chore: Remove Image Expiry (Don't delete images from S3) HOT 4
- `imgup` Fly.io App deployment overwriting AWS env vars leading to failure HOT 4
- chore: Have bucket names imported env variables
- BUG: Couldn't upload files to S3. Open an issue on Github and contact the repo owner. HOT 2
- Feat: Logging + Metrics
- `Who` can/should use our image uploading + resizing service?
- EPIC: Clarifying Goals/Roadmap for Image Uploads Project HOT 3
- Chore: Replace `AWS S3` with `Backblaze B2`
- Feat: Dynamic Image Resizing HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgup.