Comments (7)
entity.getSasQueryString()
How are you generating the sas query string?
from azure-storage-android.
var azure = require('azure');
var qs = require('querystring');
var appSettings = require('mobileservice-config').appSettings;
function insert(item, user, request) {
var accountName = appSettings.STORAGE_ACCOUNT_NAME;
var accountKey = appSettings.STORAGE_ACCOUNT_ACCESS_KEY;
var host = accountName + '.blob.core.windows.net';
var blobService = azure.createBlobService(accountName, accountKey, host);
// Provide write access to the container for the next 5 mins.
var sharedAccessPolicy = {
AccessPolicy: {
Permissions: azure.Constants.BlobConstants.SharedAccessPermissions.WRITE,
Expiry: new Date(new Date().getTime() + 5 * 60 * 1000)
}
};
// Generate the upload URL with SAS for the new image.
var sasQueryUrl =
blobService.generateSharedAccessSignature('prescriptions',
item.resourcename, sharedAccessPolicy);
// Set the full path on the new new item,
// which is used for data binding on the client.
item.imageUri = sasQueryUrl.baseUrl + sasQueryUrl.path;
request.execute();
}
from azure-storage-android.
I'm still unclear what getSasQueryString returns and I see a couple issues with the Node code you've published:
- What version of the storage Node lib is this on? At least in the newer versions generateSharedAccessSignature returns just the SAS query, not an entire URL.
- Assuming you have a valid url, I see you've taken only the baseURL and the path, but SAS is a query. Where are you actually doing anything with the SAS token?
from azure-storage-android.
Am having this kind of exception too but when I get the exception message ..It goes like "Address is a relative address. Only absolute address are permitted" So the question is how do I generate Absolute address..
from azure-storage-android.
That exception message means something pretty different I think. Could you post a new issue with the segment of your code having an issue and a stack trace please?
from azure-storage-android.
Have Opened it.. Thanks looking forward to your reply..
from azure-storage-android.
@amanpwl92 Haven't heard anything since Sep so closing this issue. Feel free to reopen with any follow up or start up a new issue if you have additional questions!
from azure-storage-android.
Related Issues (20)
- BlobListingDetails missing enum ALL?
- Problem uploading a file
- Unable to resolve hos
- Slow speed download
- CloudBlockBlob generated a wrong SAS token
- Random Non-Fatal Exceptions
- Outdated Sample
- Can there be a kotlin version of the sample compatible with latest azure storage version. HOT 1
- java.lang.ClassNotFoundException: Didn't find class "com.fasterxml.jackson.core.JsonFactory" on path: DexPathList
- SAS token blob container Shared Key authentication HOT 4
- Unexpected attempt to get register for a value without a register HOT 8
- Not found any example to upload a video to Blob.
- Update the Library and Simples
- CloudBlobContainer authentication error when repeating listBlobs() HOT 1
- Closeable resource has leak
- Unavailable ".withClientClaims()" method.
- Azure blob storage setup query
- Changing service endpoint for China
- This repo is missing important files
- why weak crypto ("MD5") using in this library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-storage-android.