I need a .MBTiles file to store an android tablet.
How do I download .MBTiles (Project / Data) from my Mapbox account?
See:
http://i.stack.imgur.com/IRisc.gif
Download tilesets using the tileset web service:
http://api.tiles.mapbox.com/v3/{account}/tilesets.json
You'll see a JSON list of data where you can download the MBTiles.
From the URL that #geografa shared, you can figure out the pattern to download any tileset if you've got the account name and the tileset id.
https://api.mapbox.com/v3/{account}.{tileset_id}.mbtiles
This works for all of my own tilesets that I tested.
Related
I am trying to learn React and Firebase right now. I would like to
Download an image from my Google cloud storage
Display that image on my web page
I am following this guide here to download files: https://firebase.google.com/docs/storage/web/download-files
However it seems out of date. I followed the advice on this other stack overflow thread to change the package import. google-cloud TypeError: gcs.bucket is not a function.
So right now I am able to download the file, however I do not know how to access it. From what I understand it would be in memory, but how would I display it? The docs to download a file are here https://googleapis.dev/nodejs/storage/latest/File.html#download.
This is currently what I have
const { Storage } = require('#google-cloud/storage');
function MyPage(props: any) {
const storage = new Storage({
projectId: 'myProjectId',
});
const myImage = await storage
.bucket('myBucket')
.file('myImage.jpg')
.download();
});
return (
<div id="MyPageContainer">
<h1>Hello!</h1>
</div>
);
}
Instead of doing the download of files from Cloud Storage to your web server you should provide a link in your HTML so that the users can download files directly from Cloud Storage, as mentioned by #JohnHanley in the comments.
This will take off your hands the processing of the file through your app's back-end to Cloud Storage itself, which is more efficient, but there are performance and cost factors for you to consider implementing it. If you are looking to deliver secure files directly from your web server, you can replace that for Signed URLs, you can check the documentation for it in here.
If you still choose to go with the processing through your we server, you can take a look at this example and once you download the file, you will then need to create an HTML tag + location so the browser downloads from your server.
I'm developing an extension (and website) for a friend who needs to make different profiles for people, comparable to an intranet or online address-book.
The extension works almost great, but I'd like to have an option to upload profile pictures at the frontend in the create and edit action.
The example of Helhum on Github somehow doesn't work on Typo3 7.4. It tells me
An error occurred while trying to call Helhum\UploadExample\Controller\ExampleController->createAction()
image:
Object with identifier "1:/content/" does not exist in storage
Problem might be that you do not have that folder. You can try with default user upload folder like:
UploadedFileReferenceConverter::CONFIGURATION_UPLOAD_FOLDER =>
'1:/user_upload/'
I'm developing a Google App Engine application in eclipse indigo. I'm trying to upload a word file in database using HTML file input, but it seems that my servlet version is below 3.0 and I can't use methods like getPart(). Is there any other way to this?
Did you try with the blobstoreService?
Map<String, List<BlobKey>> blobs = blobstoreService.getUploads(req);
To see more about it you can check here: https://cloud.google.com/appengine/docs/java/blobstore/
I have the Google picker set up, as well as Blobstore. I'm able to upload files from my local machine to the Blobstore, but now I have the Picker set up, it works, but I don't know know how to use the info (url? fileid?) to then load that selected file into the Blobstore? Any tips on how to do this? I haven't been able to find much of anything on it on Googles resources
There isn't a direct link between the Google Picker and the App Engine Blobstore. They are kind of different tools for different jobs. The Google Picker is designed as an end user tool, to select data from a users Google account. It just so happens that the Picker also provides an upload interface (to Google Drive) as well. The Blobstore on the other hand, is designed as a blob storage mechanism for your App Engine application.
In theory, you could write a script to connect the two, but there are a few considerations:
Your app would need access to the users Google Drive account using OAuth2. This is necessary, as the Picker API is a client side API, whereas the Blobstore API is a server side API. You would need to send the selected document URL to the server, then download the document and finally save it to Blobstore.
Unless you then deleted the data from Drive (very risky due to point 3), your data would be persisted in 2 places
You cannot know for sure if the user selected an existing file, or uploaded a new one
Not a great user experience - the user things they are uploading to Drive
In essence, this sounds like a bad idea! What is your use case?
#Gwyn - I don't have enough reputation to add a comment to your solution, but I had an idea about problem #3: You cannot know for sure if the user selected an existing file, or uploaded a new one
Would it be possible to use Response.VIEW to see what view they were using when the file was selected? If you have one view constructor for Drive files and one for Upload files, something like
var driveView = new google.picker.View(google.picker.ViewId.DOCS);
var uploadView = new google.picker.DocsUploadView();
would that allow you to know whether the file was a new upload (safe to delete) or an existing file (leave it alone)?
Assuming that you want to pick a file from your own Google Drive and move it to the Blobstore.
1)First you have to perform Oauth for Google Drive API
2)Using the picker when you select a file from drive, you need to get it's id
3)Using the id obtained in step 2 you can programmatically download it using Drive API
4)After downloading the file you can use FileService(deprecated though) to upload the file to the
Blobstore.
How does one get image data (image url, image info) from datastore through an api?
Is there a tutorial or a project that lets you upload images like FotoRatan but also has an api which can be used to get the image and image info from another website?
Here is an example how to store and serve files (maybe images) using Blobstore: http://code.google.com/appengine/docs/java/blobstore/overview.html#Uploading_a_Blob
You should also look at Picasa Web Albums Data API