Comments (6)
@gosukiwi Unfortunately, I am not well versed with file uploads. This is a stripped down (and now untested) version of something I have done in the past - it may be more in line with what you wanted:
(defn upload-image []
[:div
[:iframe {:name "some-target-name"
:style {:display "none"}}]
[:form
{:method "post"
:enc-type "multipart/form-data"
:action "/api/some-endpoint"
:target "some-target-name"
:on-submit #(foobar %)}
[:input
{:id "id-file"
:type "file"
:name "id-file"}]
[:button
{:id "submit"}
"Send File"]]])
The accompanying backend is another piece, but this would be the 'reagenty' part.
from reagent-cookbook.
@gosukiwi I added a recipe called file-upload
. I used the service filestack which appears to be pretty popular and supports s3, dropbox, Azure, etc.
from reagent-cookbook.
Oh wow, thanks a lot! It's great! Originally I ment just a file upload to a local web server though, checking out that solution it seems that they host the files themselves. Maybe I'm mistaken though.
from reagent-cookbook.
@gosukiwi Is this issue ok to close or are you still searching for more?
from reagent-cookbook.
Yes, this is ok, you can close it. Thanks a lot for your help! 👍
from reagent-cookbook.
No problem!
from reagent-cookbook.
Related Issues (20)
- might be a good recipe for doing server side rendering HOT 2
- Drag and drop example HOT 1
- Missing License HOT 1
- Markdown editor recipe needs to include content in the args to the render fn HOT 10
- typo in Draggable recipe HOT 1
- Routing with secretary and using dispatch! HOT 1
- PDF.JS HOT 1
- file upload example is advertising, not tutorial HOT 1
- Use CLJSJS for Google-Maps example HOT 1
- Tip: Improving devcards experience with error-boundary HOT 2
- File upload example: callback function? HOT 4
- reagent-server-rendering puzzle? HOT 4
- Recipe correction for google-maps recipe HOT 1
- Thanks so much for this project! HOT 3
- filter-table index.html and project.clj discrepancy HOT 1
- Update ReactCSSTransitionGroup example? HOT 1
- Where is section on namespaces / imports / project structure HOT 1
- Update dependencies HOT 2
- `test-example-with-ReactTestUtils` fails with error HOT 1
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 reagent-cookbook.