Comments (5)
When you upload an image via Dante uploader, you will get a POST request to the server url defined in upload_url option on Dante initialization.
So , your php app should receive that POST request with the image data, not an url. with that data you have to do the upload in php and return to that request the url of your uploaded data, so Date will now that the url returned by your php script is the url to be replaced in the tag on the interface.
I don't do PHP anymore, but in ruby a simple example would be:
# Handle POST-request (Receive data, save the uploaded file and return url of upload image)
post "/upload_image" do
name = params['file'][:filename]
path = File.join(File.dirname(__FILE__), '/uploads/images', name)
File.open(path, "wb") do |f|
f.write(params['file'][:tempfile].read)
end
return "/uploads/images/#{name}"
end
from dante.
@michelson don't forget about the recently upload callback :D
from dante.
I found the problem -- forget to restart server ! sad:(
here is simple php code :
//upload.php
from dante.
great! , if you found more issues on this , please reopen this issue or submit new one
best!
from dante.
Wonderful! It was this small piece of information that I missed I guess. Or maybe I was not thinking clearly when you mentioned $_POST in your documentation. I have managed to do both : storing of the image, also the file (will have to improve my code, but successful in the basic features)
Now trying to figure out a way to list the edited pieces and edit them again. :)
from dante.
Related Issues (20)
- No documentation for Dante3
- Typescript declarations missing for dante3 HOT 1
- How to multi-column? HOT 4
- how can i compile it to plain vanillaJS? HOT 1
- prosemirror-state package constructor issue HOT 2
- "Cannot load such file -- coffee_script" for Rails 7 HOT 1
- Cannot Start a New Line When Uploading Images & Image Gets Deleted When Pressed Enter [Video Included] HOT 2
- prosemirrorState Error HOT 37
- cannot build dante3 HOT 2
- running Dante locally with errors... HOT 1
- where can I find "Clear Format" ? HOT 3
- prosemirrorState.PluginKey is not a constructor HOT 7
- Dante3 not working with vite HOT 7
- RangeError: Adding different instances of a keyed plugin (plugin$) HOT 4
- Is that possible? Add JS dynamic charts. HOT 13
- How would I get the "raw" html for image block?
- TypeError: Cannot read properties of undefined (reading 'Extension') HOT 3
- How can I use Dante with JQuery?
- Dante 3 Nextjs page to Nextjs app HOT 9
- Dante3 doesn't work with Vite 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 dante.