Detect browser drag and drop compatibility by Blueimp jQuery-File-Upload API - jquery-file-upload

Is it possible to detect browser drag and drop compatibility by using Blueimp File Upload API or its function/variable? Or this plugin just waiting for actual drag event from browser and does not analyze its capabilities?
This would be useful to hide drop zone instuctions (like "drug files here") from the old browser user.
There are independent methods proposed in this answers:
https://stackoverflow.com/a/18890590/1056384 , https://stackoverflow.com/a/8743796
For the file drag it is also good to cheсk window.FileReader:
return 'draggable' in document.createElement('span') && typeof(window.FileReader) != 'undefined';

Related

TinyMCE - Upload images, media and documents to your own server

I am using TinyMCE for publishing articles in some journalistic and cultural portals.
As for the media (images, audio, video, documents), everything will have to be uploaded and managed internally, without using external links to services such as YouTube and TinyPIC, which I have no control over to ascertain the permanence of the media.
I was already using the images_upload_url option for images but I cannot find a similar option for all other media or a general option that works for all media types.
For some current sites I am using the external responsivefilemanager plugin but I was hoping that in future releases of TnyMCE an internal option similar to images_upload_url would be integrated.
Is this an option I can't find or has it not yet been integrated and responsivefilemanager still needs to be used?
I recently had the same question, turns out if you are using a paid plan for TinyMCE, you could use their TinyDrive plugin & a TinyCloud account.
This allows to upload images, files and medias, plus it better integrates with their tools (ie you have a nice UI to access uploaded files by your text editor)
It may answer your need! I give you the link to their documentation: https://www.tiny.cloud/docs/tinymce/6/tinydrive-introduction/. You have a nice example on this page, to try it :
Click on the Upload icon and upload your video
Click on Insert > Media > General
Click on the Upload icon and here is your video that you can add to your text content
Have a great day,

How to capture network info in Chrome devtools when clicking a link pop up a new download tab and closed right away?

I’m trying to use chrome devtools to see what network requests are.
But for some links, a new tab will be created for downloading a file and once the file is downloaded the tab is immediately closed.
There is no time to for me to inspect what the network requests are involved in the new tab. Is there a way to force the download in the original window so that I can still see the network activity?
As this answer suggest, yo may want to use chrome net export using chrome://net-export/
How it works?
You open a new tab and enter chrome://net-export/
Press the start logging to disk button and select a file
Do whatever
Press the stop recording button and inspect the file (should be formatted to be readable)
How to reproduce?
function popup() {
window.open('https://google.com', '_blank')
}
<button onclick="popup()">
click me
</button>
You will get WAY more information than you wished for, so - be patient when going over all the traffic details and also - make your recording as targeted and short as possible
Enjoy
EDIT
#Nathan raises a fair point in the comment - this method is not visual. a tool that may help to visualize the data is netlog viewer
Use the link, press the choose file button and upload your json file
In the left menu select events - this will display all events in a big table
Filter table by using URL_REQUEST or
Click each item to inspect and get detailed information (such as: url, headers, method, etc.)
There are other cool tools there (such as timeline) but it is different from chrome dev tools. This solution is just another set of tools for developers, that's all

Protractor - dragging from desktop

Does anyone have an idea how in a protractor test I might choose a file from the desktop and then drop it on an element in my page?
I presume it's a matter of using data to represent the file (path etc) in some format and then dropping that on the destination control, but that's a guess...
The scenario I am looking at is a file upload where there isn't a "File" input (at least not yet), but uses Javascript instead to respond when the user drops a file on a specific element.

jQuery File Upload Using Siebel OUI in IE11 Does Not Work

When I attempt to drag and drop a file onto a Siebel attachment list applet, IE11 is opening the file instead of uploading/creating new record in the applet. I can see the drop zone tag "Copy" when I hover over the applet but when I drop the file it gets opened in the same browser window. Expected result should be that the file is uploaded and added to the applet in Siebel without any prompts.
Figured it out, the browser was running in elevated mode for the dedicated client. The drag and drop does not work for local dedicated client unless you are running IE in non-elevated mode. Also, the new button on our applet was invoking "NewRecord" method instead of "NewFileAttachment" as it does in OOB Siebel account attachment applet. So I changed MethodInvoked for the New button to "NewFileAttachment" and ran the dedicated client in regular mode and drag and drop works beautifully :)

open ms doc,docx or image file in browser in c#

I have developed the asp.net mvc application. my one form have the file upload control. so in details view i want to implement the facility to view the uploaded document in browser itself. it should not ask for download and should not open MS office instance to open document. its a user req. It should opens in view mode in browser itself. what code i have to do ? I am using C# as language.
It is not straight forward. For images you can use <img>tag and link to the location in server where you saved the uploaded image. That should work.
However ASFAIK showing the doc/docx things in web page itself is not possible. You will have to employ some third party control to achieve that. Search google to find such controls. May come at a cost.