How can I upload large files by chunk, pieces? - file-upload

I have got a little file sharing webpage. It's free to use it. I would like to upload files between 0mb and 1GB. I'm searching in Google since two days, but I can't find anything what I needed...
My webpage: http://boxy.tigyisolutions.hu However I can upload only 20-30mb now. I would like upload only 1 file at once. But it may be bigger than 500-600mb ... Can anyone help me?
I tried jquery fileupload, but it's uploading nothing for me.

The Blob.slice method will allow you to split up a file client-side into chunks. You must then send each chunk individually. This will only work on browsers that support the File API.
If you don't want to write this code yourself, Fine Uploader is a javascript uploader library that has the ability to chunk files for you and send them to your server.

Related

Telegram API, uploading images to get a FileID in VB.NET

I recently started building a little bot in VB.NET and got pretty far with it. Though, there are quite some things I'm simply not getting far with.
One of these things is uploading an image.
I use the Telegram API as a DLL which is pretty nice so far.
Though, I struggle with uploading pictures.
The code itself is Telegram.bot.SendPhoto.sendFromFile_id(chat_id, <fileID goes here>).
it is pretty much self explanatory, though I have no idea how I can obtain a fileID. The API itself does not explain how to do it, and I'm not that good in reading other codes from other languages and translate them over into the language I'm using at this moment.
Is there any kind of solution for this I could try to use?
Telegram API Document description about FileID ( Source:Telegram Bot API ) :
There are three ways to send files (photos, stickers, audio, media, etc.):
If the file is already stored somewhere on the Telegram servers, you don't need to reupload it: each file object has a file_id field, simply pass this file_id as a parameter instead of uploading. There are no limits for files sent this way.
Provide Telegram with an HTTP URL for the file to be sent. Telegram will download and send the file. 5 MB max size for photos and 20 MB max for other types of content.
Post the file using multipart/form-data in the usual way that files are uploaded via the browser. 10 MB max size for photos, 50 MB for other files.
I have same problem and solve this way :
1.first upload image to cloud and get image url
2.set URL file_ID
C# Code example :
String ID = bot.chat_id;
bot.SendPhoto.sendFromFile_id(ID, "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png");

Finding the file size of an image file in the Sony Camera Remote API

I'm writing a fairly involved application for working with Sony cameras.
I can list the contents of the camera and copy image files no problem at all, but I can't seem to figure out the size of the files before I start to download them.
I'm receiving the file list using the standard getContentList API, and finding the files using the originals array in the response. That response seems to have no file size information in it.
Is this possible? Knowing the file size before downloading is important for a good user experience, and all the other camera APIs support it.
I do get the size when I start to download in the HTTP Content-Length header, but performing HEAD requests to hundreds of URLs in a row seems very inefficient!
Unfortunately the API does not support getting the file size.

Count no. of pages in a PDF file while uploading in Javascript

I want to calculate number of pages in a PDF file while uploading to my application by Javascript in Client Side. I want some help for this. I Google this topic but I couldn't get any appropriate solution.
If you are uploading PDF file to the server anyway then it is better to do this on the server-side, there are lot of options depending what is your target platform).
For example, you may use the open source Ghostscript to count total number of pages.

OneDrive - Wrong size for PNG files

When uploading certain PNG files the size is incorrectly reported on the OneDrive website and in the Photo object returned by the REST API. This can be reproduced using the following PNG file:
http://www2.zippyshare.com/v/11270772/file.html
The file size is 20.3 KB, OneDrive displays it as 38.4 KB
It seems this only happens with PNG files that would be downsized/converted when the downsize_photo_uploads query param is absent or set to true. But the problem is not just limited to uploads using the REST API.
The problem has been already been reported here.
Ryan from OneDrive here. We looked into this and have a good understanding of what's going wrong with the size. OneDrive computes the "space" a file takes up in our system by using the size of the largest data stream associated with a file. When an image is uploaded to OneDrive, we also create thumbnails for images so that we can quickly show various views in our clients and website.
In the case of this particular file, one of the JPG thumbnails we create for the PNG file is actually larger than the original file (due to the JPG compression not being as effective as PNG for this image). As a result, the thumbnail is actually the largest stream on the file. As you can imagine, that doesn't happen very often, but for this image (and others like it) we have this bug.
We have a bug tracking the issue and are investigating how we can fix the API to return the size of the "default" stream -- the stream that represents the actual contents of the file. I don't have an ETA for the fix, but we're working on it.
FWIW, I appreciate your post, I discovered that is seems to be the same issue with the Android Onedrive SDK post I made a couple weeks ago
Does OneDrive change/re-encode jpg files?
It doesn't seem like anyone from MS is actually monitoring these SO tags very closely, so I'm creating a Github issue on the Android SDK, maybe that will produce an answer.
https://github.com/liveservices/LiveSDK-for-Android/issues/37

Upload large file on server is this possible by create firefox addon

I want to upload large video file. for that i want to create firefox addon. Is this possible by create firefox addons to upload large files on my server.
or is there any other way to upload large files on server.
please suggest.
If you are POSTing the data to the server as application/x-www-form-urlencoded then you should base64 encode it using btoa() and include it as one of the POST parameters in the request body (i.e. the string passed to XMLHttpRequest.send()):
postbody = "body=" + btoa(fileContents);
xhr.send(postbody);
If you are just downloading the file and uploading it right away, you might as well keep it in memory since you're presumably going to load it into memory anyway in order to base64 encode the contents.
Well if you're reading the file into memory then you should need an nsIFile at all. You can just download it using XMLHttpRequest and use responseText, uploading it in the way I described in the answer. If you do have an nsIFile then yes, that snippet describes how to read from it.
I assume you are wanting to upload via HTTP.
If so, the upload limit is usually decided by the server-side software. This affects both the maximum size and the length of time you have to upload it.
Without a server capable of taking an upload in chunks and reassembling it, you are limited in ways you can't get around through software.
If you want to upload via FTP on the other hand, there are a lot of options... look at FireFTP.
I have made firefox addons for fileupload.
I integrate jquery file upload.
I create widget. In the widget I made panel. In panel I create separate web page for file uploading. And panel is calling that page.
For more information you can mail me at chetansinghal1988#gmail.com