Comments (11)
Hi @akkias , dont't worry.
after upload the image where is keept ? is it visible from some path ?
let' say localhost:8888/images/name.jpg ? if it's so the upload response, where the file is uploaded, should return that path.
best
from dante.
Yes, I can view that file by hitting some url like localhost:8888/uploads/images/name.jpg
but I am not able to call that image in saved data because I am saving editor data by doing editor.getContent() which returns BASEURI.
from dante.
So what we are doing is we collecting data from response.all and I think I am probably wrong there.
from dante.
the upload process is different from editor.getContent and save interval, when you upload an image through Dante uploader , Dante expect that the server response of that upload returns the image path, that's it, like localhost:8888/uploads/images/name.jpg, if it's so Dante will handle the image display properly
from dante.
check the image server example bundle exec rackup config.ru
from dante.
I am using PHP (Laravel) and kinda stuck on that thing only :(
from dante.
If you don't mind, can you elaborate how to handle and retrive editor data.
from dante.
I personally don't use auto save, so how I do is listen to the form submit event , and then i call editor.getContent()
and I pass that value to my form text input before submit.
something like:
btn = form.find(".btn.submit")
btn.on('click', function( event ) {
$('form').find("#post_content_input").val(editor.getContent());
$('form').submit()
})
from dante.
@akkias I'm using Laravel 5.0 to handle Dante upload and here is my code :
public function store(uploadFileRequest $request)
{
$file = $request->file('file');
$destination = storage_path().'/uploads/';
$file->move($destination, 'random_file_name_here');
echo 'http://example.com/image.jpg';
}
For paste image, I suggest you to use Intervention package, (http://intervention.olivervogel.net/)
You can do some thing magic like this:
public function paste(Request $request)
{
// array('image' => base64 string)
$img = Image::make($request->image)->save('path_to_file');
}
from dante.
Yay! It worked! thanks much Michelson
from dante.
hey @thangngoc89 can you tell me how are you using Dante in laravel? i cant get it to work. Thanks!
from dante.
Related Issues (20)
- 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
- Need help in fixing Dante-3 issues HOT 1
- Uncaught TypeError: styled.div is not a function 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.