1

The code is basically gives a browse button to browse pc files:

def _upload():

    _upload_widget = fileupload.FileUploadWidget()

    def _cb(change):
        global file_contents
        decoded = io.StringIO(change['owner'].data.decode('utf-8'))
        filename = change['owner'].filename
        print('Uploaded `{}` ({:.2f} kB)'.format(
            filename, len(decoded.read()) / 2 **10))
        file_contents = decoded.getvalue()

    _upload_widget.observe(_cb, names='data')
    display(_upload_widget)

_upload()

But the output is:

FileUploadWidget(label='Browse', _dom_classes=('widget_item', 'btn-group'))

Any help is appreciated.

Javad
  • 2,033
  • 3
  • 13
  • 23
Ajay Singh
  • 11
  • 1
  • Did you had a look https://stackoverflow.com/questions/39495994/uploading-files-using-browse-button-in-jupyter-and-using-saving-them here? – mcgusty Jun 06 '21 at 07:35
  • have you solved this problem? – psj01 Feb 08 '22 at 05:58
  • Does this answer your question? [Uploading files using Browse Button in Jupyter and Using/Saving them](https://stackoverflow.com/questions/39495994/uploading-files-using-browse-button-in-jupyter-and-using-saving-them) – Javad Nov 15 '22 at 07:27

1 Answers1

0

Ensure that after running the code, this button shows "Trusted" as in here , else click on it and confirm that it is trusted.

Your "Browse" button should show after this.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Roxy Nov 16 '22 at 15:09