Uploading file to the server for download

I’ve my front end written using HTML/CSS/Javascript. Front end is communicating with the backend(Oracle database) using Java Webservices (Spring boot app).

Situation #1: User clicks on the Download button, using Ajax call, I call my Java webservice, java webservice returns the data in JSON format, I display this data in the UI in tabular format.

Situation #2: Since the amount of data to be returned is going to be huge, when a user clicks on the download button,I am expecting that the query could take hours or maybe a day to finish. Once the query is finished,I would like to upload the data returned from the webservice in a file at some location on the (RHEL)server so that when user comes back, he/she can click the Download button and download the file with huge data in whatever format it was saved (CSV, Excel etc)


1) I was reading in another Stack overflow post here that saving file using FileSystemAPI on Firefox isn’t supported. I am wondering if this is even a good solution based on the situation #2 described above?

2)If a webservice keeps on running for a day, isn’t it going to time out in few hours? I’ve a feeling that the approach I’ve mentioned in Situation #2 above isn’t an efficient one.

3) Is there something else that can be done in a more efficient manner to accomplish my task? Probably, some scheduling at database point of view?

4) In Situation #2, since the query is going to take long time, I am also planning to change the display of Download button to something “Come Back again”. In this scenario, how would I determine that a particular query is going to take long time?

Ubuntu server crashes while uploading large files

Trying to repurpose my old Dell Optiplex 745 as a media sever. Loaded Ubuntu 16.04.5 LTS, set up drives in Ext 4 with snapRAID and SAMBA. I’m trying to upload movie and TV files from my newer PC running Windows 10. The server crashes on upload of every 3rd to 8th file. I get different messages. Some start with “BUG: unable to handle kernel NULL pointer dereference at 00000000000001”. Some with “general protection fault :0000 [#1] SMP”. Sometimes the server PC just spontaneously reboots. The files are 1 – 5 GB in length and transfer very fast (approx. 100 mb/sec), when they work. I’ve tried it with the Windows firewall on and off. I’ve tried it with 8GB of memory and with 2 DIMMs removed to give 4GB. I’ve tried it with FTP using Filezilla in Windows, and by dragging and dropping with file manager. None of it makes any difference. I have 3 dmesg log files from 3 crashes, which can be provided if you can tell me how to attach them. They seem to long to just paste here. I’d appreciate it if anyone can help.

Magento2 – Category Thumbnail image not uploading

I am using an extension of Amasty for layered navigation which also provides facility of category thumbnail image upload.

Unfortunately the upload of Thumbnail is not working for me, I am not getting any error in console and also nothing is received in var logs.

On debug I figured out few things:

1) when uploading Thumbnail image from category details page afterSave function is not called. I found this function in


2) When uploading simple Category Image that comes default this same afterSave is called.

3) Due to this I think “moveFileFromTmp” this function is not called that is in


This function is responsible for moving file from temp folder to category folder

4) Image is uploaded successfully in temp folder of category.

5) I have crosschecked in Database and the value in backend_model for the attribute is already


** Any suggestion what may be the cause of this uncertain behaviour.

Writing blog posts + uploading on WP, Blogger got cheap

Hi all,

Writing blog posts bundled with uploading on WordPress or Blogger with relevant image or/and video have got cheap. The offer is only limited to long-term client provided we start with a small package of 15 short news of 150 words each on any niche and both are comfortable with each other.

15 posts bundle – $ 15 only


Uploading file on sharepoint with python

I try to upload a small text file on SharePoint with Python requests :

from requests_ntlm import HttpNtlmAuth import requests url="https://sharefrance.xxxx.com/FR/ECES/Wiki%20Documents" auth=HttpNtlmAuth('domain\user','password') logFile='testLog.txt' with open(logFile, 'rb') as fd :     r = requests.post(url,                       files={'file': (logFile, fd)},                       auth=auth)     print(r.url, r, r.headers) with open(logFile, 'rb') as fd :     print(fd.read()) 

I get correct answer 200 from request but my file is not on SharePoint :

https://sharefrance.xxxx.com/FR/ECES/Wiki%20Documents/Forms/AllItems.aspx  <Response [200]> {'Cache-Control': 'private, max-age=0', 'Content-Type': 'text/html; charset=utf-8', 'Content-Encoding': 'gzip', 'Expires': 'Sun, 23 Dec 2018 15:19:43 GMT', 'Last-Modified': 'Mon, 07 Jan 2019 15:19:43 GMT', 'Vary': 'Accept-Encoding', 'Server': 'Microsoft-IIS/8.5', 'X-SharePointHealthScore': '0', 'X-AspNet-Version': '4.0.30319', 'SPRequestGuid': '2cb1b39e-2364-109a-4475-3bf486ec2f9f', 'request-id': '2cb1b39e-2364-109a-4475-3bf486ec2f9f', 'X-FRAME-OPTIONS': 'SAMEORIGIN', 'SPRequestDuration': '106', 'SPIisLatency': '0', 'X-Powered-By': 'ASP.NET', 'MicrosoftSharePointTeamServices': '', 'X-Content-Type-Options': 'nosniff', 'X-MS-InvokeApp': '1; RequireReadOnly', 'Date': 'Mon, 07 Jan 2019 15:19:43 GMT', 'Content-Length': '35311'} b'\r\nRunning test 2 : C++\r\n 1  : \r\n' 

If I try to read (requests.get) or delete a file from SharePoint it works. Any hint ? Thanks !

How To Reset Ownership And Permissions of Wp-Content Folder, In Order to Fix HTTP Error When Uploading Images to WordPress Media Library

I’ve noticed several articles about how to deal with the HTTP error when uploading images to the WP Media library:

How to Fix HTTP Error When Uploading Images?

However, I’ve already tried adding this code to the functions.php file:

add_filter( 'wp_image_editors', 'change_graphic_lib' );  function change_graphic_lib($  array) {     return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); } 

(As was suggested by the most upvoted answer in that article)

And I’ve also tried some of the things that were suggested in the accepted answer of that article, such as adding define('WP_MEMORY_LIMIT', '64MB'); to the wp-config.php file, and adding the following codes to the .htaccess file:

  1. AddType x-mapp-php5 .php

  2. <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule>

  3. # Exclude the file upload and WP CRON scripts from authentication <FilesMatch "(async-upload\.php|wp-cron\.php|xmlrpc\.php)$ "> Satisfy Any Order allow,deny Allow from all Deny from none </FilesMatch>

But still the HTTP error remains.

I admit – I haven’t yet tried the suggestions in this article (25 Image Media Uploader Problems – WordPress), but before I do, I also heard that I should try resetting the ownership and permissions of the wp-content folder. And I would like to try that first.

So, what does it mean to reset the ownership and permissions of this folder? Would I simply need to follow the instructions in this article (How to Fix File and Folder Permissions Error in WordPress)?

The article suggests changing the folder permissions to 755 (my folders already have this permission)

enter image description here

And the file permissions to 644.

enter image description here

But I’m nervous about doing this. I don’t want to make any changes that can’t be undone and I’m not even sure if this is what’s meant by resetting ownership and permissions of the wp-content folder.

Please advise as to whether or not this is the best way of “resetting the ownership and permissions of the wp-content folder”, and if you think it will help to eliminate the HTTP error when uploading images to the WordPress media library.


Multiple HTML5 Video Source Blob URL Uploading

I am trying video uploading.But first user can preview the video and then upload it.The problem is multiple BLOB Url uploading via ajax and getting file as List HttpPostedFileBase .I am using ASP.NET MVC.

                    var $  source = $  ('#' + id);                     var reader = new FileReader();                     reader.readAsDataURL(this.files[0]);                     reader.onloadend = (function() {                     $  source[0].src = reader.result;                     $  source.parent()[0].load(); 

Uploading a file to a specific directory within a Document Library using CSOM

I currently have a Desktop application that is able to upload a file to the root directory of my “Documents” Document Library on the Sharepoint Site I am using.

This is done with the following code;

    Dim context As New ClientContext(serviceSiteUrl)     context.Credentials = GetCredentials()     Dim web = context.Web     Dim newFile = new FileCreationInformation     newFile.Content = IO.File.ReadAllBytes(destination)     newFile.Url = Path.GetFileName(destination)      Dim docs = web.Lists.GetByTitle("Documents")     docs.RootFolder.Files.Add(newFile)     context.ExecuteQuery()     Console.WriteLine("File uploaded")     context.Dispose() 

My question is; How am I able to get this application to navigate instead to one of the folders that is currently present within the document library? Currently, the files being uploaded are within the same directory as the folders i’d like them to be within.