How to resume upload on react-native app after its closed

Started by Mohammed-alhasan5 replies643 views
Mohammed-alhasanOriginal post
#1

Hi there , we are currently using Uppy on our react native app, and we are trying to resume the upload after the app is completely closed, so far we tried to save the Uppy state before exiting the app , and set the Uppy state on opening, but that did not help , any idea on how we can handle this

Thank you

PreetamKumarjoshi
#2

Hi Mohammed-alhasan
Did you mean, you upload an image and pause the uploading and then close the app
If this is the case Then I think you should try GoldenRetriever

const GoldenRetriever = Uppy.GoldenRetriever;
		
		        uppy.use(GoldenRetriever, {
		            indexedDB: { maxFileSize: 10  1024  1024, maxTotalSize: 300  1024  1024 }
		        }).run();
		        
				//console.log("GoldenRetriever");
				//console.log(GoldenRetriever);
				
				uppy.getFiles().forEach(file => {
					checkfile_exist = 1;	
				});
				
		        const ThumbnailGenerator = Uppy.ThumbnailGenerator;
		
		        uppy.use(ThumbnailGenerator, {
		            indexedDB: { maxFileSize: 10  1024  1024, maxTotalSize: 300  1024  1024 }
		        }).run();
		        
		        uppy.retryAll();

Thanks
Preetam Kumar Joshi

Mohammed-alhasanReplying to #2
#3

Hi Preetam, Thank you for the reply , yes its exactly what you mentioned , but we are using React-Native ,will goldenRetriver still work ?

PreetamKumarjoshiReplying to #3
#4

Yes, You have to install it and then you can use

Mohammed-alhasanReplying to #4
#5

Golden Retriever dose not work on react-native , any other alternative solutions 😦 ?

PreetamKumarjoshiReplying to #5
#6

Will you please show me your code ?
Is it possible to use uppy CDN?
Thanks