Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there support to get progress during a large file upload? #28

Open
paolorotolo opened this issue Aug 1, 2016 · 5 comments
Open

Is there support to get progress during a large file upload? #28

paolorotolo opened this issue Aug 1, 2016 · 5 comments

Comments

@paolorotolo
Copy link

paolorotolo commented Aug 1, 2016

I'm using this method to upload some files on Blob (some files are large and take several minutes to upload).

    private void updateFilesOnBlob(){
        try {
            String timestamp = Tools.generateTimeStamp();

            // Retrieve storage account from connection-string.
            CloudStorageAccount storageAccount = CloudStorageAccount.parse(storageConnectionString);

            // Create the blob client.
            CloudBlobClient blobClient = storageAccount.createCloudBlobClient();

            // Retrieve reference to a previously created container.
            CloudBlobContainer container = blobClient.getContainerReference(CONTAINER_NAME);

            // Upload each file on Blob
            for (int i = 0; i< pathsArrayList.size(); i++) {
                // Define the path to a local file.
                final String filePath = pathsArrayList.get(i);
                CloudBlockBlob blob = container.getBlockBlobReference(timestamp + "/" + filenameFromPath(pathsArrayList.get(i)));
                File source = new File(filePath);
                blob.upload(new FileInputStream(source), source.length());
            }
        }
        catch (Exception e)
        {
            // Output the stack trace.
            e.printStackTrace();
        }
    }

As you can see, I use blob.upload() to start uploading the file. Is there any way to get the progress percentage and update the UI during the upload?

@jofri-msft
Copy link

Hello @paolorotolo ,

We do not currently have support for getting the progress as a percentage and can take this into consideration as a feature request.
However there is support in the operation context to setResponseReceivedEventHandler() to notify you every time a put block call is made.

@ManuBabu
Copy link

Same reply, not able to get progress status.

@manmohan556
Copy link

What about the put block list.How will i confirmed that image finally uploaded and i am ready to download.

@niteshkejriwal
Copy link

Do we have any further news here? Are we looking this to be implemented in near future?

@chess92
Copy link

chess92 commented Aug 3, 2020

This would be helpful to have. I'm trying to wrap my brain around someone building an uploader where progress wasn't the first feature that was implemented LOL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants