It's possible to rename the file while uploading to my account in box.net?
I'm using the 1.0 version and the next url:
https://upload.box.net/api/1.0/upload/myauth/myfolderid?share=1
I know it's possible to rename the file using ajax but there's nothing in the API, a option like "share" for example, to do that?
There isn't a way to rename the file and upload in the same API call in V1, but you can rename the file with a second API call: http://developers.box.net/w/page/12923947/ApiFunction_rename
Related
API call for download a file which is csv is giving good repsonse in Tree listeners. I have save the downloaded file using save response to a file listener using prefix with name.csv.
But on chcing in bin folder of jemter the same csv seems to be 0 bytes. whereas in tree listeners i can see repsone.
what should i do to get the same data in csv file too.
enter image description here
Most probably you're looking at the wrong file. If you want the result to be saved as CTCbreakup.csv you need to use the following configuration of the Save Responses to a file listener:
Default configuration will give you something like CTCBreakup.csv1.octet-stream
More information: JMeter Performance Testing: Upload and Download Scenarios
I can use GAS script to upload a file to my drive as below:
media = MediaFileUpload(
filename,
mimetype=mimetype,
resumable=True
)
request = service.files().create(
media_body=media,
body={'name': remotefilename, 'parents': [folderId]}
)
But if I upload the same file multiple times, it will generate multiple copies. Is it possible to keep the same file but keep different version? just like what the UI update version does?
Solution:
Instead of a create request, you can issue an update request to an existing file with newRevision parameter set to true to create a new revision for the same file.
For more information on how to use Files: update, you can check the official API documentation.
We auto-publish a Google Docs Spreadsheet (one tab as CSV). Google docs is providing a fixed URL that refers to the CSV. We import this CSV in another tool for product data import.
Suddenly this URL is redirected by Google Spreadsheet. If we go again in "File/Publish To The Internet" we can the same URL for that CSV.
Question: How can get the URL without redirection again?
Error: Source file
https://docs.google.com/spreadsheets/d/e/2PACX-1vTQsBEmvOwFwxORMqYg2N6LzzYqdqsdDCjxqsdqsdH72gdMCP4xrs1lsN37RO4h1-rjJsQ/pub?gid=501162839&single=true&output=csv doesn't exist (HTTPS : File not found ! (HTTP/1.0 307 Temporary Redirect)). Please check the source file path.
In short, the collection process needs to follow the Location header. Depending how you're getting the CSV this might be simple or a pain. I collect CSVs using curl so just adding the -L switch is sufficient to make sure the incoming files are the CSV we're looking for instead of the HTML that we were getting without -L. Without knowing what utility or process you're using to download the CSV I can't be more specific, unfortunately.
i am trying to make auto-desk forge viewer.
using this link Forge & ASP.NET: from zero to hero in 30 minutes
and it works fine with single revit file.
now i want to view revit document that has linked document and i found this post How to Set References with Revit Files for View and Data API
but i think it is an old version of api.
so i don't know how to apply these steps in the viewer code.
any help
A zipped file which is contained the host RVT file and corresponding linked files can help you archive this goal. After uploading this ZIP file to the Forge DM, you have to make sure that ‘compressedUrn: true’ and ‘rootFilename: {your host RVT filename with the sub filename .rvt}’ your input field of the job configuration body while submitting your translation job. Please refer here for the details: https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST/
Some more info:
If you do not want to manage the reference, while simply count on Forge detects the reference automatically, the choice is what Eason mentioned: package all files in an zip, upload, and ask Forge Post Job service to translate the zip. You only need to specify the root file.
https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST/
This blog tells more:
https://forge.autodesk.com/cloud_and_mobile/2016/07/translate-referenced-files-by-derivative-api.html
If you want to manage the reference, e.g. in one time, you have uploaded all files of one version or only a few files of the package. While after some time, some files need to be updated, or are not referred anymore, but it is unnecessary to upload all related files again (as in #1, upload zip again).
In such scenario, the choice is, firstly, set reference manually by another Forge service (Set Reference):
https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-references-POST/
next, ask POST Job service to translate:
https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST/
As of 1/2020 Autodesk has said that they do not support reference endpoint when exporting to SVG so zip file is the only supported method currenty.
In the Google-Drive developers guide they show us to:
i) upload a file:
https://developers.google.com/drive/manage-uploads
ii) update a file's data:
https://developers.google.com/drive/v2/reference/files/update
The second option ii) update a file data by overwriting the file's previous data. Is there anyway I can add data to a file without overwriting it? Just add lines to a file?
Thanks.
No
The Drive API deals with files as a whole.