How to upload folder in php - javascript

Hi i wanted to upload folder and move to some destination is it possible doing in php ? or at least i can read the folder name and create same folder in divination and copy all files into created folder.

You can do this with the new HTML5 directory capabilities. Just put the directory attributes in your input field. After you got the directory server-side, you can do everything you want with it.
URL for a simple guide:
http://www.w3bees.com/2013/03/directory-upload-using-html-5-and-php.html

Related

How to create a folder in Infura IPFS with Node

I'am trying to upload a folder of json files to infura. If i try to upload them one by one I have no issue. But what I'am trying to achieve is something like this:
IPFSHostname://QmcUHTMEqc4pQvyToVhA3g8QjKGavhD56mh9rtSXWxQULx/folder_name/2.json
And basically add all the files to that url, where the last param would be the file name. Is this even possible?

How to change path of welcome html file

I have created Dynamic web project and it has .html, .css and .js files. I group these file in respective folders like .js file in javascripts folder and .html file in views folder but i don't able to access these file in project. I used eclipse IDE for this. Is there need to configure path for these folder?
You need to put the JSP file in /index.jsp instead of in /WEB-INF/jsp/index.jsp. This way the whole servlet is superflous by the way.
WebContent
|-- META-INF
|-- WEB-INF
| -- web.xml
-- index.jsp
If you're absolutely positive that you need to invoke a servlet this strange way, then you should map it on an URL pattern of /index.jsp instead of /index. You only need to change it to get the request dispatcher from request instead of from config and get rid of the whole init() method.
These are not Java source files, so it makes no sense to configure them as such. By default in a Dynamic Web Project you only see the src folder under Java Resources. Other folders will be listed at the bottom of the tree. This is by design.
Or if you meant, that you do not see them when you move into the folder by an external file manager: press F5 on the project.
Its based on from which file you are trying to access those files.
If it is in the same folder where your working project file is, then you can use just the file name. no need of path.
If it is in the another folder which is under the same parent folder of your working project file then you can use location like in the following /javascript/sample.js
In your example if you are trying to access your js file from your html file you can use the following location
../javascript/sample.js
the prefix../ will go to the parent folder of the file(Folder upward journey)
I got answer to my question...
Now my directory structure is
WebContent
--javascripts
--stylesheets
--viwes
--META-INF
--WEB-INF
Note: view contain html files
To change path of my welcome html file i made bit change in web.xml present in WEB-INFfolder.
<welcome-file-list>
<welcome-file>/views/welcome.html</welcome-file>
</welcome-file-list>

Is it possible to extracz a zip file by file to file

Hy
I have a question, is it possible to unzip a file via php but by file to file? I read some some zip Exempels in the php Manuals but i need a Way to extracz one file and than the other file.
For example:
I have a zip file with many Folders and in this Folder are some pictures. Now i want to extracz the First zip item and check:
If it is a Folder
If true than create a new file, extracz the Folder, create a new Folder in this Folder and save there the new file
If it is a file, than check size and Type
If this is correct than do something with this file
Next item
I als wantask if it is possible to check via javascript the zip file?
I readed something about a zip Library
I only want to read all files and check size and Type before uploaded

How to src to a file in a folder within a folder

Hi I'm pretty new to HTML and JavaScript and I was wondering how to src to a file in a folder within a folder?
Any help would be appreciated.
To be more specific I'm trying to access a JavaScript library in a folder named yui and which is another folder named libraries.
<script src='./folderwithinfolder/file.js'></script>
To break it down:
./ = folder this file is in.
folderwithinfolder/= A folder within the folder the webpage is in.
file.js = Javascript File.
You can change the SRC to follow where you want to go the folders:
libraries/yui/your-library-name-here.js

Combine all files in a folder as pdf

My current problem is that starting from the root folder I have to look into each folder and if one file exists then save it as a pdf with the folder name in a different location. If more then one file exists then combine this into one file, save it as a pdf with the folder name in a different location.
Example:
- Root Folder
- Folder1
- FileA.tif
- FileB.tif
- Folder2
- FileC.tif
- Result Folder
- Folder1.pdf (Contains FileA.tif and FileB.tif combined into one pdf)
- Folder2.pdf (Contains FileC.tif as pdf)
I am currently using Acrobat 9 Professional. I know I can do this manually, but I have to do this for hundreds of folders and each folder has one or more files.
My preffered solution would be in Acrobat Javascript on Windows XP.
Somethings that I am trying to figure out is if I can do some sort of:
For each folder in Root Folder
For each file in folder (Save the folder name too)
Combine files (I think I can mange this based on some examples I have seen)
I think that would give me a good start.
Any help would be greatly appreciated.
GhostView is a command-line program that can manipulate PDF files. Years ago, I used this to concatenate thousands of PDF files into a single PDF for download. It can convert multiple file types to PDF, plus you can apply all of the PDF security options to your final PDF as needed. You'll need the commercial version if you're packaging this for a product.
I am trying to solve the same problem here.
You need to install GhostScript and use some bat file to do the job.
I started to write this:
#echo off
set folpath=%~dp0
set PROG="c:\Program Files\gs\gs9.04\bin\gswin64"
set OUT= "%folpath%Combined.pdf"
pushd "%~dp0"
call %PROG% -o %OUT% -sOUTPUTFILE="%folpath%Merged.pdf" -dBATCH "%folpath%doc2.pdf" "%folpath%doc1.pdf"
pause
But it is not ready :)

Categories

Resources