CKEditor upload; PHP $_FILES array empty after submitting file - upload

CKEditor's "upload" tab will submit a file in the field "upload" - in PHP, that goes to $_FILES['upload']
The sentence above is taken from: How can you integrate a custom file browser/uploader with CKEditor?
My problem: after selecting a file from my local Windows hard drive and hitting the "Send to server" button, the file is not accessible in $_FILES['upload'], more specifically, the $_FILES array is empty.
Does anyone have an idea what I might be doing wrong? Thanks for your support.

Related

upload file to upload box using selenium webdriver

I am trying to upload image to web site via upload box
but the problem is that upload box does not accept any values
any try to send image to that upload box just opens it but can not send image path to it
how to deal with windows download box
You should first inspect the page (F12) and identify the xpath of the input webElement (could be something like this: //div[#id='input_field']).
Then you should use the selenium keyword 'choose file(locator,file_path)'.Selenium Keywords
I see that you also mentioned 'download box' in your question,if you have another question about that please create another question and I could answer it.
Wait Until Element is Enabled //button[#id='upload1btn']
Choose File //button[#id='upload1btn'] path_to_file
#COMMENT: DO NOT FORGET IMPORT OF SELENIUM LIBRARY

Web Scraping - Downloading Zip File

I'm trying to download a bunch of PDF files from a website that come bundled in a zip file with python. To download the zip file, I click a download button that makes a popup appear (I assume this is not important to the problem but I will include it for completeness). Chrome shows this when the download button is pressed and the popup appears:
I must then click the download button that's on the popup to actually begin the download. This is what follows:
I am quite confident that the first request is the only important one. If we look at the headers for this POST Request we see this:
All the POST data needed for this request can be scraped from the previous HTML page with the exception of the downloadedZipToken. This token is only generated/added to the html form after I click the download button on the popup and you can see that it's returned to me in the response header as a cookie.
So to summarize. In order to have a python script download the zip file for me I believe I have to mimic this POST request which I haven't been able to do because the zip token is not initially accessible. I apologize if this was confusing. Please let me know if more information is needed.
The downloadZipToken POST data that I wasn't able to find in my original question turns out to be a unix timestamp which makes a lot more sense as to why I couldn't find it in the HTML source. I assume it's generated by some JS script once the POST request is sent. To write my python code I just generated a unix timestamp with
timeStamp = math.ceil(time.time()*1000)

Spyder Ipython Console - code to automatically print to pdf and save to HTML file

I am working in Spyder and would like to record the console output as either a html or pdf file. Currently the only way to achieve this is to right click on the console window and then choose 'save as'.
The problem with this approach is that the file path needs to be specified manually. It would be much more desirable to be able to set the working directory in the code and then save the pdf or html automatically to this location. Is this possible?
Or if this is not possible, is there any code that when the 'save as' option is right clicked, the file browser is opened on the current working directory?
(Spyder developer here) My answer:
Or if this is not possible, is there any code that when the 'save as' option is right clicked, the file browser is opened on the current working directory?
We can implement this in a future release. Please open an issue in our issues tracker so we don't forget to do it in the future.

Upload and parse an Excel file in a Backbone.js app with Rails backend

There is a lot of information in the title of the question !
I'm aware of Rails gems to upload files, parse Excel, etc. but I would like to know which solution will work nice in a Backbone app (that is, I don't want to reload the page during the upload). Is there a Backbone extension for that ?
The story is: the user wants to upload an Excel file, she browses her filesystem, selects the file, click "upload"... and then the Backbone app shows the content of the file (I don't need to store the file on the server).
Well, i dont think there is any backbone extension for that :) What you need is some upload extension like uploadify of http://blueimp.github.com/jQuery-File-Upload/ . You will bind the
success method to uploader and then you can do anything with the data returned from server.

open an excel file located on the server instead of download it MVC

I'm building a Reporting web application right now with MVC3 and I've come up to a couple problems.
My goal is to have it able to generate and view Crystal Reports, SSRS reports, and Excel documents.
Right now I'm working on the Excel segment and I'm running into more trouble than I thought I would. First off, when I link directly to the file, it either opens inside the browser or it downloads it from the server and if the user makes changes it doesn't actually save it to the true file on the server.
I've tried both linking to the file directly using Razor and a ViewModel with the path to the document as well as directing it to an action that returned a File.
I've also tried linking it to a shortcut to the actual file thinking that if I could open the shortcut it would open the file the way I wanted it to and unfortunately it didn't really open at all.
The users already have access to the files on the server through a network drive, so as of right now they can go into the server, open the excel document, edit and save it no problem. I want to duplicate this effect through a link. The program already has a file browser built, so I can browse between the files and make links to the reports.
Thanks in advance!
Since they are apparently on a network drive, you can just link to the files directly, relative to the user?
For example: a link to file://///SERVERNAME/folder/
I tested it between two computers on the network, and that seems to work. However, you still get a popup asking that you want to do with the file, open or save. (both in firefox and IE)
Note: Yes, that many slashes seem necessary, lol

Resources