zimbra zimlet to upload files in a briefcase folder from backend - javascript

I am creating a zimlet using js to generate a tree folder structure, but I also need it to include some files (default ones that are on the server). The problem is that I can't find a way to do this without asking the user to select the files manually. Any help on this?

You should check the zimbra soap which is realy helpful to you. I think you get the soap which upload the file in brifcase folder.

Related

How can i import pdf files dynamically into react

i am working on a react app, created using "create-react-app". i have many pdf files stored in my public folder, inside an assets folder: public/assets/file.pdf
my app has to be running locally (without web server) and i need to load these files in order to display them. i cannot store the files elsewhere and get them via axios. it has to be from the public path
If someone has the info on how to do this, please enlighten me. thank you
I have tryed to do it this way : import("assets/filename")
i tried to put different urls, i took a look at the webpack config even tho i am no expert.
But it doesn't seem to work at all.
Take a look a react-pdf, it may help

Can I change or upload a file in the directory of my html-file?

So I have the following situation:
There is an HTML file in some directory on my PC. If I open this HTML file in a browser, I want to click a button with which I can write or change a file in the same directory.
So there is no server whatsoever, just an HTML file opened in a browser.
Is this possible?
Calling a python script from a button would also work for me.
I just have to be able to detect a change in the directory when the button is clicked.
TL;DR
Yes it is. but there is additional system like git. and you need to implement using javascript.
Not a solution
I am sorry about I can not provide exact solution about your question. but I can give you keywords. I assume you do not know about git.
I recommend implement local git system for your local directory. because there is lot of changes your files. (like edit single character or add new files) and some of files you do not want detected (that's mentioned in .gitignore)
and there is suitable project for you isomorphic-git
. and If you heard about git first, also check github guide.

want to count files from a directory in same project by javascript

I am creating a HTML page where I need to count of files present in the specific folder in same project package, I tried to write the code in javascript but have not succeeded yet. Most of the question threads mention about "ActiveXObject" to be used but that itself does not work for me. Reference: JavaScript: Read files in folder Can anyone help me in achieving this? Please Suggest any Idea if this can't be achieved only by javascript lang.
HTML + JavaScript in your case is frontend technologies unless you use javascript as backend(nodejs) you won't be able to read project folder contents.

Serve compressed vs uncompressed js and css files based on url parameters - AngularJs, Grunt

I am new to AngularJS and Grunt world. I am trying to setup FE environment and want to figure out a way to serve compressed or uncompressed js and css based on url parameters.
For example, by default I want compressed files.. if I append
&debug_js=true //I want browser to serve uncompressed js files..
&debug_css=true //I want browser to serve uncompressed css files..
&debug_css=true&debug_js=true //I want browser to serve uncompressed js and css files..
Thanks in advance!
Was just thinking about this today! Here's what I came up with:
If you have access to server side, you could read the query parameter there and write out the uncompressed script references
If you want to do it client side, you could create simple function that document.write's out your script references depending on the query parameter
After looking at couple of other references, I found similar article which addresses this question:
Have Grunt generate index.html for different setups

Download multible files with JavaScript(one Download)

I generate a HTML page with VB.Net which stores several pinks to files. These links are formatted with JavaScript looking like the Windows-Explorer with folders and files. The problem: There are only download links for the files, not for Folders. A folder can contain Subfolders ,a List of Files or a combination of both. So if I want to download a folder, I have to click manually on every file-link. I have not the possibility to insert PHP or another Server-side language.
my question now is:
Is there a client side way to Download them by click on a Folder? I prefer Javascript but If it isn't possible Flash will be ok also.
What you could do is, link the folders to a special ASPX file. In this file, just create a ZIP with all the files inside it, and make the browser download that ZIP file. I think it's the easy way to accomplish what you are trying to.
With Javascript you could open several windows, one with each file downloaded. But I don't think it will please your users.
There is no way in Javascript and as far as I can tell, theres no way to do it in Flash either. A server-side zip is going to be your only way.

Categories