How to upload image to target folder on tinyMCE using justboil plugin? - tinymce

I am using justboil image upload plugin on tinyMCE. I am able to upload image but that image instead of being uploaded to target folder “media” is uploaded to htdocs folder (xampp), means it does not even get uploaded to my root folder tutorials
$config['img_path'] = `C:\xampp\htdocs\tutorials\media`;
$config['upload_path'] = $_SERVER['DOCUMENT_ROOT'] . $config['img_path'];
where my code is going wrong?

You need to set the upload folder explicitly (https://github.com/vikdiesel/justboil.me/blob/master/config.php):
$config['img_path'] = '/images/somefolder'; // Relative to domain name

Related

Flutter - Where should I save downloaded files?

I am building a flutter app (iOS/Android/MacOS/Windows/Web) which is able to download files, selected by the user. But where should I save those files? On MacOS/Windows its easy using path_provider and get the path of the downloads folder.
But where should I save the files on the other platforms? The downloads folder would be perfect because the users are able to use those files (.pdf) even without using the app, so the files are not app specific.
If you wish to save in download directory you can use
Directory appDownloadDir = await getDownloadsDirectory();
String appDownloadPath = appDownloadDir.path;
Or
getExternalStorageDirectory()//android
getApplicationDocumentsDirectory()// ios doesnt support access to download folder

How can I save a local file into assets folder in Flutter

My flutter desktop application takes a local file (audio/video/image) as user input. Now I need to save it to somewhere for later usage. So that even if the device changes the application can still access them using relative path.
What I want to do is copy this file to assets folder using file.copy method. But how can I get the assets folder's directory? I don't want to hardcode assets folder's absolute path. Is there any way to copy files into assets folder using relative path?
Or any alternate way to do the task?
assets is read-only. Use documents directory where the application can store files that only it can access.
final directory = await getApplicationDocumentsDirectory();
See Read and write files for details.

WGet multiple directoriesdirectories

I am relatively new to the scene and am not that experienced with WGet (currently using VisualWGet, but also have cmd based WGet). I'm trying to download many (182,218 to be precise) images. I can get as far as downloading the first directory and all of the images within, then it will download only one image of each directory afterwards.
I am making sure to use a recursive search, but it seems like it does not want to enter the other directories after it exits out of the first one.
here's the process:
Downloads everything in directory 0
back tracks to parent directory
downloads first image in directory 1
downloads first image in directory 2
etc
The directory i'm trying to download from is http://66.11.126.173/images/ and each directory doesn't seem to be a link, rather an image that doesn't link to another directory.
The images are listed in directories as such
http://66.11.126.173/images/0/
http://66.11.126.173/images/1/
http://66.11.126.173/images/2/
etc
each directory has 31 variations of the same image and there are 5878 directories and I start my downloads in images/0/ otherwise it will want to download the index.html file for /images/
any help will be greatly appreciated.

How to copy file from applicationStorageDirectory into dataDirectory?

I would like to copy an image file located in www/assets/imgs/christmas.jpg to the dataDirectory folder using the Ionic Native File Plugin, however I don't know how to access the www folder. I tried the following:
this.file.checkFile(this.file.applicationStorageDirectory, 'assets/imgs/christmas.jpg')
But it always returns NOT_FOUND_ERR.
You should change applicationStorageDirectory to applicationDirectory (although I am not sure what the difference is) and add www in front of the file path as the application directory contains the www folder and not its contents. So instead of assets/imgs/christmas.jpg use www/assets/imgs/christmas.jpg

How to access a added pdf file after archiving the project to copy it into users documents folder?

I want to copy a pdf file with the license agreement of my app into the documents folder of the user. I know how to access the documents folder of a user and how to copy a file but which path or 'NSURL' is the correct one for the pdf file?
I copied the pdf file into the project folder of the app and added the file with "Add files to "MyProject"..." to the project. Normally I would choose the path where the pdf is located e.g. /Users/Me/XcodeProjects/MyProject/MyProject/license.pdf but thats only the path for my Mac. How can I change the path so that it works on every Mac?
Please answer in swift language.
Following is how you can reference a local file embedded within the project,
[[NSBundle mainBundle] URLForResource:#"FILE NAME" withExtension:#"pdf"];