RobinBobin / react-native-google-drive-api-wrapper

This wrapper facilitates the use of the Google Drive API in React Native projects.
110 stars 43 forks source link

Upload video/mp4 #72

Closed Nazar1310 closed 2 years ago

Nazar1310 commented 2 years ago

I'm trying to load a video in base64 format and I get a file on the disk that doesn't work, but it works great with pictures

gdrive.files
  .newMultipartUploader()
  .setData(base64Data, MimeTypes.BINARY)
  .setIsBase64(true)
  .setRequestBody({name})
  .execute();

File Info • Resolution: 720×1280 • Duration: 15.125s • MIME type: video/mp4 • Extension: mp4 • Size: 1.19 MB

RobinBobin commented 2 years ago

How doesn't it work?

RobinBobin commented 2 years ago

Will it playback if you download it?

RobinBobin commented 2 years ago

Where do you get base64Data from?

RobinBobin commented 2 years ago

Will anything change if you set its MIME type as video/mp4?

Nazar1310 commented 2 years ago

Yes, it played after downloading, it won't open due to processing on the disk, I didn't see that.

Everything works great, thanks for the quick reply, and sorry for my inattention.

RobinBobin commented 2 years ago

:slightly_smiling_face: :+1: I'm glad you got it working.

RobinBobin commented 2 years ago

I'll close it, since it's been inactive for a while.