Debugging Responsive File Manager Plugin (TinyMCE) - tinymce

Yesterday I found this great looking plugin for file and image management for tinymce however I cannot get the files to actually save to the drive. I have tried every commbination I can think of.
responsivefilemanager.com - This plugin.
Anyone used it before and know of the settings I might need?
The plugin sits here: /public_html/cms/app/webroot/js/tinymce/plugins/filemanager
I'm trying to set it up so the uploads go here: /public_html/cms/app/webroot/files/cms
The config file for the plugin has 3 lines to configure for this, these are as follows and as I have set them up:
$base_url="http://domain.com/cms/"; // base url of site. If you prefer relative urls leave empty
$upload_dir = 'app/webroot/files/cms/'; // path from base_url to base of upload folder
$current_path = '../../../files/cms/'; // relative path from filemanager folder to upload folder
Now when I started working this out I would get an error for the plugin saying the root folder doesn't exist so I keep playing with the paths and now I don't get this error but I still cannnot get it to upload the images, everything looks like it works, I get the preview as the image is uploading and a green tick once it's complete then I go back to the files list and the image isn't there. It's not on the server either. I'm wondering if there is a way to debug this and work out what's happening?
Thanks

I ended up getting this to work with the following settings:
$base_url="http://domain.com"; // base url of site.
$upload_dir = '/cms/app/webroot/files/cms/'; // path from base_url to base of upload folder
$current_path = '../../../../files/cms/'; // relative path from filemanager folder to upload folder
Thanks

Try the following settings if you still have not got this sorted out yet:
$base_url="http://www.domain.com/cms"; // base url of site. If you prefer relative urls leave empty --> No trailing slash
// The upload directory will be a dir you have created for the files to be uploaded to, ie: localhost/cms/app/webroot/files/cms --> this file must have write permission.
$upload_dir = '/app/webroot/files/cms/'; // path from base_url to base of upload folder --> write permission (chmod = 755)
$current_path = '../../../../files/cms/'; // relative path from filemanager folder to upload folder (you are missing one "../")
// The thumbs folder located in tinymce/plugins/filemanager/thumbs must also have write permission (chmod = 755)
That should do it

use gsynuhimgupload plugin TinyMCE
http://gsynuh.com/tinymce-simple-image-uploader/136
TinyMCE simple image uploader
Here’s a repost of my TinyMCE image uploader plugin. It used to be on gsynuh-labs.com (but I let this domain go).
please note that this plugin is no longer supported by me – and I’m not responsible for any inconvenience caused by it, it is shared “as-is” and you have to be responsible when using it ie: take care of any possible injection problems/security problems in your own site’s context.
I’m not interested in expanding it myself as I was only looking for a very minimal image uploading plugin for myself but If you are going to expand on it, I can list your version on this page if you want, just contact me.
—

Related

Flutter - Pick files and get their path or URI

With file_picker, I can't get file's real path or URI from FilePicker.platform.pickFiles(). It only returned something like this
/data/user/0/my_app_dir/cache/file_picker/file
and logged this
I/FilePickerUtils(27005): Caching from URI: content://com.android.providers.media.documents/document/video%3A1519
D/FilePickerUtils(27005): File loaded and cached
at:/data/user/0/my_app_dir/cache/file_picker/file
D/FilePickerDelegate(27005): File path:[com.mr.flutter.plugin.filepicker.FileInfo#705d9ef]
That's not what I want. I just want the real original absolute file path, the file information, regardless of what I'll going to do with the file. So I'm looking for a package that do that or the solution how to manually pick file and get the file path like I could do natively. Thank you in advance.
It's not impossible with native code. It's just package publisher who made it unavailable using it. Follow this to implement file path picker on native code. It works for me.

Typo3 - Images aren't found on "sub paths" (no absolute path)

I wrote a Typo-3 template which is working fine the problem is that when I call a "sub path" the image links aren't found anymore.
/index.php: every thing works fine
/test/index.php: images aren't found anymore
The problem is that no image url is an absolute path whether from TypoScript or from fileadmin via component.
Is there a way to force absolute path use everywhere?
I assume you use an extension to get nice URLs (coolUri or realUrl) so you get path segments for each page other than the root page.
So you have subfolders in your URL but always the index.php from your webroot is called.
Now you have images which by default are referenced relative to the working php script. As the working php script is /index.php a path to fileadmin/img/image1.jpg is correct.
But your browser thinks you are in path /test and requests an image <domain>/test/fileadmin/img/image1.jpg, which does not exist.
Either your browser needs to know which base to use for server pathes (setting base Url),
or (better) you provide absolute URLs for any resources. This can be done with a little typoscript configuration:
config.absRefPrefix = /

Access downloaded pdf file path in HTML5 file system and display it in webview

In my chrome app, I am using HTML5 file system to save the pdf files to sand box.Downloading is working fine.But how do i access that downloaded file path? I want to give that path as webview source.
The best way, if it works, would be to use a filesystem URL. To get this use FileEntry.toURL
These don't work on external files (i.e. files that come from chrome.fileSystem.chooseEntry and are outside the app's sandbox) but should work for files in the app's sandbox.
Note, I am referring to filesystem:// urls not file://urls, which won't work as Marc Rochkind has pointed out in his answer.
Disclaimer: I haven't tested this, but I believe it should work.
You need to get the contents of the PDF into a data URL. See my answer to this question:
Download external pdf files to chrome packaged app's file system

Download / upload file using the Add-On SDK

I am currently trying to download a small binary file from the web, in order to upload that to another website, both using the API.
Previous versions seemed to have the "file" API module for such purposes, but I can't see anything similar as of the latest (1.14).
The file to be downloaded would be saved in some form of cache (browser cache, preferably), its path stored somewhere, to be then uploaded to another URL via POST.
How would I go about it, when the process should happen completely in the background?
I checked out the how to download a file page, but can't figure out where to download.
Is there a variable URI for the "Downloads" directory, and does a regular Add-On has write privileges in it?.
This is important, because the add-on must be able to function properly on various platforms.
You can use the pref, browser.download.lastDir, which should work for windows/mac as it will be saved in the OS format. However the pref may not always be set if the person has never downloaded anything before. In that case you'll have to build the directory yourself.
var dir = require("sdk/preferences/service").get('browser.download.lastDir');
To build the directory yourself you're going to have to go a little deeper. Check this article on MDN about File I/O which has examples. The DfltDwnld key should give you the directory you want.
Your add-on will have write permissions to everything Firefox has write permission to.

Access relative path from eclipse-plugin

Does anyone know how to get a file with uri from a self-made Eclipse Plug-in?
Absolute paths would be no problem:
URI.createFileURI("C:/Users/hp/workspace(dke)/SMartGen/StarSchema.profile.uml");
But how do I access local resources relatively?
URI.createFileURI("jar:file:/%ECLIPSE_HOME%/plugins/SMartGen.jar!StarSchema.profile.uml");
doesn't work this way....
Happy for every answer.
lg martin
Use the FileLocator.
Example:
URL iconUrl = FileLocator.find(Platform.getBundle("myBundle"), new Path("icons/someIcon.png"), null);
This will get the URL of a file "someIcon.png" that is located in the "icons" folder in the bundle "myBundle".
For getting a resource out of eclipse, you can use org.osgi.framework.Bundle.getEntry(String). That returns a standard java.net.URL, which can also be used to get the InputStream for consumption. It has the advantage of not caring if your plugin is in directory form, jar form, or in your workspace.
Bundle bundle = FrameworkUtil.getBundle(MyClass.class);
URL url = bundle.getEntry("StarSchema.profile.uml");
URL has a handy toURI() method as well.