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

When i Upload image/video from IOS Azure Access level change from Blob to Private #49

Open
priyankabhanderi9 opened this issue Jun 18, 2022 · 9 comments

Comments

@priyankabhanderi9
Copy link

priyankabhanderi9 commented Jun 18, 2022

Screen Shot 2022-06-18 at 7 50 13 PM
Screen Shot 2022-06-18 at 7 54 39 PM

I can't access the URL which is generated by Azure

Screen Shot 2022-06-18 at 7 59 16 PM

Working fine in Android
"react": "17.0.2",
"react-native": "0.68.1",
"react-native-azure-blob-storage": "^2.0.3",

@RobertPetricevic
Copy link

RobertPetricevic commented Jul 1, 2022

Hi @priyankabhanderi9 one question. I have RN project with same versions of react, react-native and react-native-azure-blob-storage as you. But when I try to start project I get this error "Plugin with id 'maven' not found." While searching on web, I've seen some answers saying that maven is deprecated since gradle 7 and react-native 0.68 has gradle version 7. So question is have you run across this error?

@Elijah23Johnson
Copy link
Owner

Elijah23Johnson commented Jul 1, 2022 via email

@priyankabhanderi9
Copy link
Author

Hi @priyankabhanderi9 one question. I have RN project with same versions of react, react-native and react-native-azure-blob-storage as you. But when I try to start project I get this error "Plugin with id 'maven' not found." While searching on web, I've seen some answers saying that maven is deprecated since gradle 7 and react-native 0.68 has gradle version 7. So question is have you run across this error?

Update maven with "maven-publish" like this
apply plugin: 'maven-publish'

@etonnelier
Copy link

etonnelier commented Jul 13, 2022

If you're not using SAS, you could use the function uploadBlobToContainer instead of uploadBlobToContainerSas in ios/EAzureBlobStorageFile.m . This function does not change the access level.

To do so remove the if/else condition
if(SAS){
[self uploadBlobToContainer: options rejecter:reject resolver:resolve];
}else{
[self uploadBlobToContainerSas: options rejecter:reject resolver:resolve];
}

and replace it with
[self uploadBlobToContainer: options rejecter:reject resolver:resolve];

@RobertPetricevic
Copy link

Hi @priyankabhanderi9 me again. I've upgraded my project to 0.68 RN version. After implementing your fix from above (apply plugin: 'maven-plugin'), I've run into new error:

Could not find method mavenDeployer() for arguments [build_81lt8pd1gauvvm48fltx8p3i6$_run_closure4$_closure15$_closure17@7604fa08] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.

Do you have any idea :)

@maliksoban
Copy link

Hello @Elijah23Johnson i am getting the same issue with this library when SAS is false it will provide an old expired SAS in url and also auto update the permissions on azure side from public to private .
But when i make SAS true in configure section it doesn't pass any token what is whe way to pas the SAS using react-native please guide ASAP

@Elijah23Johnson
Copy link
Owner

Elijah23Johnson commented Mar 15, 2024 via email

@maliksoban
Copy link

maliksoban commented Mar 15, 2024

@Elijah23Johnson Thankyou for your quick response, Let me provide you some more details what issue i am having.

true-SAS

When the SAS is true then the Response for the uploaded image will be the below —— >>>

"image" : "Rn2UXkCgDtMd6M0R0gzURSrQVyf1_03-15-2024_LEFT_FACING_21921933607.jpeg"

false-SAS

When the SAS is false then it will provide a response that is given below but the token after ? I dont know from where it is being picked.

image : “https://skylarksit-gym.blob.core.windows.net/skymobile/Rn2UXkCgDtMd6M0R0gzURSrQVyf1_03-15-2024_NONE_2689678198747.jpeg?sig=cvByX%2B7zS%2Bo%2BhKlf%2FzvbVipulbjtl1%2Far%2BkrgJf%2F3fQ%3D&si=readwrite&sv=2015-04-05&sr=c”

Upload-code

the above is my upload code ...
what i want is that to pass the SAS token let suppose "xyz" along with my image when SAS is true.

or second solution when i make SAS as false it changes the Azure storage access permissions from public to private whenever i upload the image

please i already integrated your library and its now an issue that i am facing in my PRODUCTION envirnoment and its an P1 i am facing at the moment kindly help me out in that

"react-native-azure-blob-storage": "^2.0.3" this is the library version i am using .

@Elijah23Johnson
Copy link
Owner

Elijah23Johnson commented Mar 15, 2024 via email

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

No branches or pull requests

5 participants